eXpres++ BMP-ICO-PNG

This forum is for ideas and or code to be contributed for general use.
Post Reply
Message
Author
User avatar
slobodan1949
Posts: 80
Joined: Mon Apr 25, 2011 8:57 am
Location: SERBIA
Contact:

eXpres++ BMP-ICO-PNG

#1 Post by slobodan1949 »

I have a problem with eXpress++ whenever I place icons and bitmaps
in DCMENUITEM and in working mode with:

DCMENUBAR oMenuBar

and in working mode with:

DCMENUBAR oMenuBar OWNERDRAW



Also, there is a problem with icons and bitmaps being placed
to the PUSHBUTTONXP command button. After increasing to full screen
PUSHBUTTONXP and the icon and bitmap on it increase proportionally
also increases proportionally and drastically loses quality,
so much so that it becomes ugly and unusable.

That problem does not exist with icons and bitmaps that are placed
to the PUSHBUTTON command button. After increasing to full screen
the PUSHBUTTON but the icon and the bitmap on it increase proportionally
do not increase and retain their original appearance and quality.


I made this test program to clear up those problems,
by further visually seeing and knowing what I can do and how I can do it
and where I can place from resources ICO, BMP, PNG, JPG, GIF


Why is this not unified in eXpress++ in the following way:

- what happens in DCMENUBAR also happens in DCMENUBAR OWNERDRAW

- what happens in DCPUSHBUTTON with ICO,BMP,PNG,JPG,GIF happens
se and in DCPUSHBUTTONXP

there are probably good reasons. Otherwise, Roger Donnay would have
already taken care of it.

It is what it is. We work further according to these rules and do not protest much.

Maybe it will be useful to someone.
download file: eXpres++ BMP-ICO-PNG.ZIP
Attachments
eXpress++ BMP-ICO-PNG.zip
(67.44 KiB) Downloaded 154 times

k-insis
Posts: 94
Joined: Fri Jan 28, 2011 4:07 am

Re: eXpres++ BMP-ICO-PNG

#2 Post by k-insis »

Thx for post. I remember somewhere reading that issue and recomendation to simply use pushbuttonxp all the time.

I use .png for graphic elements but during build process they are made from .svg vector files into rather larger at 100x100 pixels so scaling issues are not obvious when proportional increase.

Exe increase by using larger png is 'sitnica' .


slobodan1949 wrote: Fri Nov 04, 2022 2:14 pm I have a problem with eXpress++ whenever I place icons and bitmaps
in DCMENUITEM and in working mode with:

DCMENUBAR oMenuBar

and in working mode with:

DCMENUBAR oMenuBar OWNERDRAW



Also, there is a problem with icons and bitmaps being placed
to the PUSHBUTTONXP command button. After increasing to full screen
PUSHBUTTONXP and the icon and bitmap on it increase proportionally
also increases proportionally and drastically loses quality,
so much so that it becomes ugly and unusable.

That problem does not exist with icons and bitmaps that are placed
to the PUSHBUTTON command button. After increasing to full screen
the PUSHBUTTON but the icon and the bitmap on it increase proportionally
do not increase and retain their original appearance and quality.


I made this test program to clear up those problems,
by further visually seeing and knowing what I can do and how I can do it
and where I can place from resources ICO, BMP, PNG, JPG, GIF


Why is this not unified in eXpress++ in the following way:

- what happens in DCMENUBAR also happens in DCMENUBAR OWNERDRAW

- what happens in DCPUSHBUTTON with ICO,BMP,PNG,JPG,GIF happens
se and in DCPUSHBUTTONXP

there are probably good reasons. Otherwise, Roger Donnay would have
already taken care of it.

It is what it is. We work further according to these rules and do not protest much.

Maybe it will be useful to someone.
download file: eXpres++ BMP-ICO-PNG.ZIP

User avatar
Tom
Posts: 1165
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: eXpres++ BMP-ICO-PNG

#3 Post by Tom »

I use .png for graphic elements but during build process they are made from .svg vector files into rather larger at 100x100 pixels so scaling issues are not obvious when proportional increase.
This is not correct. Portable Networks Graphics (PNG) is a format for compressed raster graphics. It bears a lot of resemblance to the JPG format, but it is not a vector-based format. When scaling, the images lose sharpness. The major difference to JPG is that PNG-images are losslessly compressed. Because of that, the files are a little bigger.

SVG is completely different. You can look at the "source" of a SVG-file and you may understand it. SVG is XML-based and describes how the images are to be painted. This works excellent with simple and sharp graphics (painted with a vector-graphics supporting tool), it doesn't work with paintings and photos. SVG is made for scaling; that's what the "S" stands for.

We use icons on buttons, icons saved in several sizes. When loading (before loading), we check the screen resolution/image size, and we load the best matching icon size. This is not the best way, but the icons look good with almost every resolution.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

skiman
Posts: 1183
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: eXpres++ BMP-ICO-PNG

#4 Post by skiman »

Hi,

Using an icon font solves this problem. This way it looks good for all sizes, and you can use every color you want, since it is a font.

I created my own icon font with icomoon, which is a free online tool.
Best regards,

Chris.
www.aboservice.be

User avatar
Tom
Posts: 1165
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: eXpres++ BMP-ICO-PNG

#5 Post by Tom »

"Feather" and some other icon fonts are great and full of cool icons.

But. We use tons and tons of icons, several thousands, and > 99 percent of those are non-standard-icons or mixed icons with overlays. You don't get this from an icon font. I wish XbpIcon would support SVG, that would solve all those needs and problems.

Add: We use icon collections from Axialis and the Axialis Icon Generator. I just found out that the AIG is able to create icon fonts if FontForge (free) is installed. I'll check this out ...
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

Post Reply