Jump to content

Is it possible to automate resizing?


Recommended Posts

I have a bunch of images of various sizes that I want to bring down to 65x40px while maintaining the aspect ratio. That generally means I have to:

 

1. Resize to 65px width and less than 40px height.

 

2. Increase canvas to 40px height while keeping the image in the middle.

 

3. Deleting the white borders created up and down. (Still trying to figure how to set Paint.net to increase canvas and fill with alpha not white.)

 

4. Saving the file.

 

Repeat for every single picture.

 

Is there any way for me to automatize any number of these steps? I found the ScriptLab plugin, but as far as I see it can't do resizing.

 

Thanks in advance.

Link to comment
Share on other sites

post-44830-0-92691400-1452164789_thumb.p

Irfanview can do most of it.

I didn't yet find solution for step 3 but other steps can be done very easily for whole folders at once.

You can keep the originals and just create scaled versions in a different folder.

Edit:post-44830-0-17515400-1452165078_thumb.p

Those PNG settings could do step 3 maybe.

Edited by Zagna

sig.jpg.7f312affa740bae49243c4439bc4a244.jpg

Link to comment
Share on other sites

To answer this:

.. (Still trying to figure how to set Paint.net to increase canvas and fill with alpha not white.) ..
 

Paint.NET uses your secondary colour to fill in the space created when the canvas is enlarged using Canvas Size.

So, the simple solution is to set the secondary colour's Alpha - Opacity value to 0 (zero).

Xkds4Lh.png

Link to comment
Share on other sites

Zagna

Thanks. I'll give it a try.

 

To answer this:

Paint.NET uses your secondary colour to fill in the space created when the canvas is enlarged using Canvas Size.

So, the simple solution is to set the secondary colour's Alpha - Opacity value to 0 (zero).

Ah, I knew there had to be a simple solution to this. Thanks for pointing this out.

Link to comment
Share on other sites

Zagna

I've played around with it for a bit, but I can't seem to get it to work write. It always turns the alpha channel to black. Even if I work with the alpha settings, it either leaves black borders or plain messes up the image completely. Here are my experiments: http://imgur.com/a/NUvcE

 

EDIT: Further research reveals that not checking "Save Transparency as Alpha Chanel" is not only making the border but also other internal issues. Checking it makes the high transparency image, but it is technically closer to the Paint.NET processed image bar the transparency issue.

 

​EDIT: Apparently the IrfanView forums do not accept new registrations, so asking for help there is out of the question...

Edited by MaxRavenclaw
Link to comment
Share on other sites

post-44830-0-70845200-1452261877_thumb.p

Could this maybe work?

In options, change the main window color to something which doesn't appear in your images, some very weird color.

Then in the batch canvas size set the canvas color the same color.

Maybe?

I was able to make transparent images with that way with some quick tests.

sig.jpg.7f312affa740bae49243c4439bc4a244.jpg

Link to comment
Share on other sites

First of all, thank you for your continued support, mate!

 

Second. If you recheck the imgur album, you'll see the results. Still get a border with one option (just pink now) or get wierd transparency issues (in this case it tints the image green). I'm guessing it subtracts the background color or something. No luck.

 

Well, a pity. I'll have to see if I can use GIMP's BIMP plugin. A pity, Paint.NET is pretty much the best thing ever, pity it doesn't support batch processing.

Link to comment
Share on other sites

ZagnaI want to thank you for your support. Even if Irrfanview didn't solve my issue, I did find another solution.

 

I installed BIMP for GIMP which allowed me to mass resize my images, but it turns out that the resampling algorithm used by GIMP looks worse than how a resampling would with Paint.NET. Turns out Paint.NET uses fant when I choose Best Quality, producing the best results compared to Nearest Neighbour, Liniar/Biliniar, Cubic/Bicubic or Sinc(Lanczos3) available to GIMP. So I was back at square one. Then I found the WIndows Image Resizer that uses fant. Only issue is that it doesn't do padding, but I can do that with BIMP.

 

TL;DR Use Windows Image Resizer, then add padding with GIMP's BIMP. If anyone stumbles upon this thread in the future, I hope this helps. And once again thanks, Zanga, for your patience.

Edited by MaxRavenclaw
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...