Jump to content

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


Recommended Posts

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

Link to comment
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

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...