D
D
DeadFine2011-01-20 20:08:09
Image processing
DeadFine, 2011-01-20 20:08:09

Bulk image resizing?

There are several folders with pictures (~10000 images).
Task: reduce them by 1 pixel on each side. What software can do this?

Answer the question

In order to leave comments, you need to log in

10 answer(s)
@
@mgyk, 2011-01-20
@DeadFine

imagemagick package. www.imagemagick.org/usage/resize/

A
Anton, 2011-01-20
@conturov

I like FastStone Photo Resizer. Otresize anything and anything, a lot of options.
www.faststone.org/FSResizerDetail.htm

M
Monca, 2011-01-20
@Monca

Any that supports batch processing.
irfanview has a very clear language, I would use it

R
Rafael Osipov, 2011-01-20
@Rafael

Check out this article: www.ofzenandcomputing.com/zanswers/1028

S
ShadowMaster, 2011-01-20
@ShadowMaster

IrfanView, XnView

X
xy4, 2011-01-20
@xy4

The above, SnagIt and even Photoshop. There are many options, there is little input data for a full-fledged advice.

W
Wimsey, 2011-01-20
@wimsey

If there is MS office, then the same Microsoft Office Picture Manager.

I
ipswitch, 2011-01-20
@ipswitch

Under Windows, XnView will be an excellent choice
www.xnview.com/en/download.html
Excellent, free, fast, Russian language, user-friendly interface!

V
Vadim, 2011-01-20
@de_arnst

In Photoshop, write down the action, then run it for the folder, but I'm afraid for ~ 10,000 images you will need to leave the computer running for a week ...

A
amirul, 2011-01-21
@amirul

Something like this:

$srcPath = ".\Pictures"
$shrinkBy = New-Object Drawing.Size 1, 1
foreach ($file in dir -r -inc *.jpg, *.jpeg, *.png, *.gif $srcPath) {
    echo $file.FullName
    $src = [Drawing.Image]::FromFile($file)
    $dest = New-Object Drawing.Bitmap $src, ($src.Size - $shrinkBy)
    $format = $src.RawFormat
    $src.Dispose()
    $dest.Save($file.FullName, $format)
}

Saves changes directly to the original file (too lazy to mess around with recreating the directory structure), so it's better to work with a copy.
Repacking with default encoder parameters. If you need others, you can tinker with the Save overload.
To change the interpolation parameters, you will have to create Drawing.Graphics and draw there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question