PDA

View Full Version : How to make image to resize keep aspect ratio


roma123
08-09-2005, 04:40 PM
How to make image to resize keep aspect ratio,
I found in forum: http://www.indigorose.com/forums/showthread.php?t=7589
but unfortunately not manage insert to project.

And project size 1014x713, how to manage resize all project to 790x545,
on run, if user have 800x600 resolution on screen.

The project I copy from longedge, thank you.


Thanks.

TJ_Tigger
08-09-2005, 07:47 PM
You will need to build two projects for the two different screen sizes. Or you can build one large project like you have and position the buttons according to the size of the screen resolution.

I have reattached your project with a function I built a while ago that does what you were looking for. The function does not contain a centering function but I had the centering taken care of outside of the function that way it was customizeable per page.

Tigg

roma123
08-10-2005, 12:47 AM
Thanks TJ_Tigger.

When I jumping to next or previous picture, its resize current picture
for 0.5 sec. to size next image and jump to next image.
Do I have option to avoid this? Thank you!

Anyone manage to take image to center?
Thanks.

TJ_Tigger
08-10-2005, 06:55 AM
Yes, you have a couple of options. You can hide the image perform the resize and reposition and then show the image or you can use two image objects and alternate back and forth between the two. Hiding one then showing the other. With two image objects you could then fade one in and the other out. As far as centering I have added some code to the function that centered the image to the page you could customize this so that it centered it to a particular area of the page.

I have included the project for you to view with the modifications.

Tigg

roma123
08-10-2005, 09:51 AM
Thanks TJ_Tigger You are the BEST!