Lazarus
Home
Forum
Help
TinyPortal
Search
Login
Register
Lazarus
»
Using the Lazarus IDE
»
Designer
»
Corrupted Glyphs
Free Pascal
Website
Downloads
Wiki
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
FAQ
Wiki
Bugtracker
Packages
IRC channel
Developer Blog
Follow us on Twitter
Latest SVN
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
Search
Advanced search
« previous
next »
Print
Pages: [
1
]
Author
Topic: Corrupted Glyphs (Read 2320 times)
Raul_ES
Jr. Member
Posts: 62
My interests: Healthcare & Computers
Corrupted Glyphs
«
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,
Logged
Pharmacy + Chemistry + Biology + Healthcare + Computing
If you have any interest or project related with these areas feel free to contact me!
Handoko
Hero Member
Posts: 2160
My goal: build my own game engine using Lazarus
Re: Corrupted Glyphs
«
Reply #1 on:
September 26, 2017, 05:37:18 am »
Can you provide us some of the problematic pictures? We need to inspect it to find the answer.
Logged
Raul_ES
Jr. Member
Posts: 62
My interests: Healthcare & Computers
Re: Corrupted Glyphs
«
Reply #2 on:
September 26, 2017, 06:36:39 pm »
Here they are. No clue of what's wrong.
Logged
Pharmacy + Chemistry + Biology + Healthcare + Computing
If you have any interest or project related with these areas feel free to contact me!
wp
Hero Member
Posts: 4398
Re: Corrupted Glyphs
«
Reply #3 on:
September 26, 2017, 06:49:09 pm »
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
).
Logged
Lazarus trunk / fpc 3.0.4 / all 32-bit on Win-10
Raul_ES
Jr. Member
Posts: 62
My interests: Healthcare & Computers
Re: Corrupted Glyphs
«
Reply #4 on:
September 27, 2017, 01:00:10 am »
I am using right now Windows 10 64 bit and 64 bit FPC (CodeTyphon ide though). I'm gonna check the 32 bit environment.
Logged
Pharmacy + Chemistry + Biology + Healthcare + Computing
If you have any interest or project related with these areas feel free to contact me!
Raul_ES
Jr. Member
Posts: 62
My interests: Healthcare & Computers
Re: Corrupted Glyphs
«
Reply #5 on:
September 27, 2017, 01:54:53 am »
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,
Logged
Pharmacy + Chemistry + Biology + Healthcare + Computing
If you have any interest or project related with these areas feel free to contact me!
Raul_ES
Jr. Member
Posts: 62
My interests: Healthcare & Computers
Re: Corrupted Glyphs
«
Reply #6 on:
September 27, 2017, 02:02:43 am »
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
Logged
Pharmacy + Chemistry + Biology + Healthcare + Computing
If you have any interest or project related with these areas feel free to contact me!
Handoko
Hero Member
Posts: 2160
My goal: build my own game engine using Lazarus
Re: Corrupted Glyphs
«
Reply #7 on:
September 27, 2017, 08:33:46 am »
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?
«
Last Edit: September 27, 2017, 08:36:55 am by Handoko
»
Logged
avra
Hero Member
Posts: 1291
Re: Corrupted Glyphs
«
Reply #8 on:
September 27, 2017, 08:52:37 am »
There might be a problem handling transparency in PNG images:
https://www.google.rs/search?q=png+transparent+problem
Logged
ct2laz
- Easily convert components and projects between Lazarus and CodeTyphon
wp
Hero Member
Posts: 4398
Re: Corrupted Glyphs
«
Reply #9 on:
September 27, 2017, 10:46:08 am »
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?
«
Last Edit: September 27, 2017, 10:49:59 am by wp
»
Logged
Lazarus trunk / fpc 3.0.4 / all 32-bit on Win-10
Handoko
Hero Member
Posts: 2160
My goal: build my own game engine using Lazarus
Re: Corrupted Glyphs
«
Reply #10 on:
September 27, 2017, 11:55:05 am »
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
Logged
Raul_ES
Jr. Member
Posts: 62
My interests: Healthcare & Computers
Re: Corrupted Glyphs
«
Reply #11 on:
October 18, 2017, 12:15:24 am »
Thank you all for your help
regards
Logged
Pharmacy + Chemistry + Biology + Healthcare + Computing
If you have any interest or project related with these areas feel free to contact me!
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Using the Lazarus IDE
»
Designer
»
Corrupted Glyphs
Recent
TIBQuery Blob fields only...
by
RedOctober
[
Today
at 09:43:29 pm]
Lazarus and Ubuntu Touch
by
xinyiman
[
Today
at 09:24:55 pm]
AutoSave feature?
by
lainz
[
Today
at 09:23:01 pm]
Assistance with Android P...
by
HobbyDev
[
Today
at 09:09:42 pm]
Make StringList from Unic...
by
Thaddy
[
Today
at 08:54:26 pm]
Bug in procedure Image of...
by
valdir.marcos
[
Today
at 08:51:12 pm]
Console 24 line limit.
by
RAW
[
Today
at 08:39:27 pm]
Lazarus SQLQuery BCDField...
by
dogriz
[
Today
at 08:33:26 pm]
Visual Pascal Community E...
by
RAW
[
Today
at 08:10:09 pm]
New version of BGRABitmap
by
lainz
[
Today
at 08:03:17 pm]