And also was there an image editor application called Paint Shop Pro. It was easy to learn and intuitive to use until back then when its version was marked as 5, 6 or 7. Later versions after these have lots of changes in their features and thus seem to have become difficult for beginners to work with like photo shop. It was quick and easy to create common images with those earlier versions. As such it was also good for creating PNG images with transparent background for use as glyphs for menus or buttons in an application. But not any more!
But again, and fortunately there is another free image editor called "GIMP".
However it isn't that easy as the earlier version of the Paint Shop Pro.
Though, no matter what, now it seems it's time to start using GIMP for those works as time went by. So here goes a simple tutorial on how to create a PNG image with a transparent background for use in our applications.
- Download and install GIMP. It is free and open source project. The version used here is v2.10.10 :
- Run GIMP. Choose [File] >> [New] to create a glyph for a menu item (16 x 16) :
- Draw desired image :
- Fill the background of the image with the color to be transparent (green in this case) :
- Choose [Select] >> [By Color] then select the green background color to select all the background.
- Choose [Select] >> [Invert] to invert the selection.
- Mouse right-click the background label on the bottom-right pane of GIMP then choose [Add Layer Mask...].
- Now choose [Selection] from the popped-up Layer Mask Addition dialog box and click [Add] to add the mask.
- Choose [Apply Layer Mask] again from the right-clicked popup menu to apply the mask to the image then choose [Select] >> [None] to finish the job.
- Choose [File] >> [Save] to save the final touch :
- Choose [File] >> [Export As...] to save it as PNG image :
[Export]
- Done!
Now this transparent PNG image can be used as a glyph for any wxWidgets project :
No comments:
Post a Comment