Lazarus
Using the Lazarus IDE => Designer => Topic started by: Raul_ES on September 26, 2017, 04:15:39 am
-
Hello,
this one is driving me crazy...
Can some one please explain the following issue? What I'm doing wrong?
Take a look at both pictures. One is the form designer from the IDE and the other one is from the program, compiled and running. As you can see, some
glyphs (png file format) appear completly distorted. Why??
I can't figure out what I am missing here.
regards,
-
Can you provide us some of the problematic pictures? We need to inspect it to find the answer.
-
Here they are. No clue of what's wrong.
-
I don't see the issue on Windows (Laz trunk/fpc 3.0.2 32 bit on Win 10/64 bit). What is your OS? Which widgetset? Which Lazarus version? 32 or 64 bit? A graphics-related bug recently has been fixed for qt (https://bugs.freepascal.org/view.php?id=32465).
-
I am using right now Windows 10 64 bit and 64 bit FPC (CodeTyphon ide though). I'm gonna check the 32 bit environment.
-
Under the 32-bit IDE /64 bit Windows 10 environment the results are as follow in the images.
Glyphs appear corrupted in the form designer aswell. This is really wierd.
When designing the GUI I tend to copy&paste buttons if they have the size and dimenssions I like, and then I change the bitmap to the one intended for that button. Is there anything wrong in this procedure? Maybe the previous glyph it's not really deleted and corruprts the new one? %)
thanks,
-
Here's the source code, I don't seem to progress. I'll try to redraw the problematic bitmaps. Please, where can I find the specifications for glyph files to be used in buttons if there are any?
regards
-
Simply open the png file and re-save it using GIMP cannot solve the issue. But forcing it to PNG-24 seems to solve the problem:
GIMP main menu > File > Save for Web > PNG-24
My guess is, Lazarus has problem handling 8-bit PNG files. Where did you get those pictures? Did you draw them yourself?
-
There might be a problem handling transparency in PNG images:
https://www.google.rs/search?q=png+transparent+problem
-
I never had problems with the transparency of png images in Lazarus. But all my glyphs were "colored". these glyphs here are monochrome. Opening them in gimp, menu "Image" > "Mode", tells me they are "grayscale". Switching this to "rgb", re-exporting to png and re-loading into the demo program shows that the problem is solved this way.
I am attaching some (not all) of your glyphs saved in rgb color space.
@Handoko: My gimp (v2.8.22) does not have a menu "Save for web". Which version are you using?
-
Save for Web is very handy feature for web designers, it is a separate download as extension/plugin (for Windows). It usually installed by default on Linux.
http://registry.gimp.org/node/33
-
Thank you all for your help
regards