Sign in to follow this  
Followers 0
Thomymaster

need help on image resize (don't crop, resize and keep ratio)

3 posts in this topic

Hi

 

I have a problem and i don't know how to solve it

 

I have lots of images (approx. 2000) which should be resized as follows (the aspect ratio should be kept at all times!):

-get the pixelsize of the longest side (width or height)

1. if the width is above 1000, resize it to 1000 (the height will be scaled accordingly without affecting the ratio)

or

2. if the height is above 1000, resize it to 1000 (the width will be scaled accordingly without affecting the ratio)

Currently i use a call to IrfanView for this, but its quite slow.

"i_view32.exe O:\pics\0001.jpg /resize=(1050,0) /aspectratio /resample /convert=O:\pics\0001.jpg

Is there a way to handle this using GDIPlus?

 

Cheers,

Thomy

Share this post


Link to post
Share on other sites



This example might help you:

Br,

UEZ


Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites

Have a look at this: >link


Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0