Archivos png

Moderator: Rathinagiri

User avatar
srvet_claudio
Posts: 2220
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: Archivos png

Post by srvet_claudio »

Pablo César wrote:
srvet_claudio wrote:
Pablo César wrote:I do not know if you lost something, but I think we still can not upload images of png files in the buttons ? Or still no way to do this ? Doing by bmp we loose much quality and heavy size too.
Still can not upload images other than BMP in most controls, is a topic that I have pending.
I am happy because, now we can use png files for buttons thanks to Mr. Claudio.

But it would be perfect if it can be loaded from .rc file. Do you expect to include this feature too, dear Claudio ?
Hi Pablo:

Code: Select all

Example: MyApplication.RC 
Logo1 BITMAP Logo.BMP
Logo2 JPG    Logo.JPG
Logo3 GIF    Logo.GIF
Logo4 PNG    Logo.PNG
Logo5 TIF    Logo.TIF
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Archivos png

Post by Pablo César »

Thank you Claudio. :D
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
mruizcanete
Posts: 16
Joined: Sat Apr 19, 2014 10:17 am

Re: Archivos png

Post by mruizcanete »

First, thanks for the amazing help I find in this forum.

Reading the posts I don't know how to include a png image into a rc file and make it work.
I try to print a PDF with png images inside a rc file. I use Harupdf and the result is very good... when the images are placed inside the same directory than the program. When I try to move the program to another directory, images are lost when printing to PDF.

I'm a newbee here and perhaps the solution is so obvious I'll feel embarrased :roll: when someone answer me, but I can't make it work correctly: I need to include the png images in a rc file just to avoid the presence of these images in a directory (logos from companies and that stuff).

Thanks!!!
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Archivos png

Post by Pablo César »

mruizcanete wrote:Reading the posts I don't know how to include a png image into a rc file and make it work.
Hi Ruiz, do you tried as Claudio has indicated:

At .RC file, for example:
Logo1  BITMAP  Images\Logo.BMP
Logo2  JPG       Images\Logo.JPG
Logo3  GIF       Images\Logo.GIF

Logo4  PNG      Images\Logo.PNG
Logo5  TIF       Images\Logo.TIF

Please note this "Images\" is supposed a sub-folder called "Images" in your current folder.

At your code, let say for buttons:
DEFINE BUTTON ...
     ..//..
     ..//..

     PICTURE "Logo4"
END BUTTON
I'm a newbee here and perhaps the solution is so obvious I'll feel embarrased
Do not need to be like that. Nobody borns knowing everything...

I hope it be helpfull for everyone.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
mruizcanete
Posts: 16
Joined: Sat Apr 19, 2014 10:17 am

Re: Archivos png

Post by mruizcanete »

Thanks Pablo for your answer. Your answer is what I did since the first moment. My rc file is just like you suggest, but only works with BMP images. My PDF is OK only when the PNG images are just in the same directory than the exe. My program is working on a lan and I need to keep images out of each working station.
I think the problem is related with being PNG images that Hmg doesn't know how to deal with them inside a rc file. Or harupdf library doesn't make use of rc files. If I don't find a solution, code will be changed to look for PNG images in the server station instead of the rc file or in a working station.
Thanks for all.
Post Reply