Resizing a picture

Ask for help and post your question on how to use XnView Classic.

Moderators: helmut, XnTriq, xnview

Post Reply
stoffi33

Resizing a picture

Post by stoffi33 »

hello
you can i make my pictures smaller through the xnview? i need that so i can send some pictures via email to fdriends. heeeeeeeeeelp please!!!!! :D
User avatar
Drahken
Posts: 884
Joined: Sun Apr 10, 2005 4:29 pm

Post by Drahken »

Smaller filesize or smaller dimension? Both can be done with xnview, it's just a question of what you need to do.
To change dimension, just open the image, then click image->resize (or you can just hit shift+S on the keyboard).
Changing the filesize all depends on what format you're using (JPG, PNG, GIF, etc). Reducing the dimensions will reduce the filesize, but there are also other ways. If it's a JPG (which I'm assuming it is), choose save as and then click the options button. Now make sure that the "keep EXIF data" box is UNchecked (JPGs often have huge (and utterly useless) EXIF thumbnails embedded in them, which bloat the filesize needlessly. You can also use the slider to reduce quality (which in turn reduces the filesize).
User avatar
helmut
Posts: 8704
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Post by helmut »

Good answer, Drahken. When sending e-mails, the description in FAQ "How to prepare an image for the internet" also applies and might be helpful.

(Perhaps I should add some of your stuff in the FAQ; your hint regarding the EXIF info and embedded thumbnail for JPEGs is quite good).
User avatar
Clo
XnThusiast
Posts: 4441
Joined: Sun Oct 17, 2004 4:57 am
Location: Bordeaux, France
Contact:

Tss, tss…

Post by Clo »

:arrow: Drahken

:) Hello !
… Reducing the dimensions will reduce the filesize, …
- Sorry, I disagree, this is true with BMP only…
- I have already reported this oddness a long while ago, and didn't get satisfactory replies…
- In example :
• Open a PNG 1024*768 - 24 BPP, having a few colours, it's 56.42 KB
• Resize it in XnView (Lanczos) down to 800*600; now, the file is 158.37 KB, so almost three times bigger…
• Illogical, but true. :|

:mrgreen: VG
Claude
Clo
Last edited by Clo on Fri Sep 30, 2005 10:33 pm, edited 1 time in total.
Old user ON SELECTIVE STRIKE till further notice
User avatar
ouistiti
Posts: 353
Joined: Mon Oct 25, 2004 7:28 pm
Location: Belgique
Contact:

Post by ouistiti »

2 Clo
Confirmed and not only with xnView but also with other tools ...
Friendly
Paul
L'important n'est pas de convaincre, mais de donner à réfléchir.
The important thing is not to convince, but to incite to think.

1,77245385090552...
User avatar
ckv
Posts: 786
Joined: Wed Feb 02, 2005 2:30 pm
Location: Glow
Contact:

Re: Tss, tss…

Post by ckv »

@Clo

Using Lanczos will add couple thousands colors to the image and the big areas with only one color will be shattered to smaller areas. It makes perfect sense trust me. :D

Try this
- Use the 'Count Colour Used' function
- Resize with Lanczos
- Check the used colours again
- Reduce colour palette to near as possible to the original colour count
XnView Tweak UI - Tool to customize your XnView beyond the regular XnView options.
UI-less Settings - Documentation of all the hidden settings in XnView.
XFAM - Tool to create and customize XnView file associations.
User avatar
helmut
Posts: 8704
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Post by helmut »

Right, ckv, often it's the many colour nuances created when resizing due to antialiasing which will not compress that well anymore.

Some more aspects when talking about file size and image compression:

- JPG is a lossy format. Most JPGs available have been compressed with loss, i.e. the saved image is a bit different from the original and will have artefacts and be smoothened.

- Changing an existing JPG image and then saving it might result in larger file size since the original image has been well compressed with loss (artefacts, smoothening)

- Resizing creates new colours depending on the resize algorithm.

- Compression algorithms have different results on the same image data, changing the compression algorithm might result in a big change in file size.

- There's two ways to save the colour information of an image:
1. Colour palette (image data are only indexes in the colour palette)
2. Colour value per pixel (true colour or RGB image).
If you have few colours, using a palette can be much smaller than using true colour. Using a palette depends on the image format, e.g. GIF uses colour palettes.

I'm sure there's more aspects. This area is fairly complex, but always explicable.

A rule of a thumb is:
Significantly smaller images (e.g. 50% (or less) of original width and height) are very likely to be smaller in file size.
Nowadays, most people have monitors with a resolution of 1024x768 pixels. So when sending an image via e-mail and viewing it on the screen, it shouldn't be larger than that, sure enough the smaller the better. Personally I found that 800x600 is often a good value.

Some references to existing explanations and posts that also provide interesting info regarding the "size phenomenon":
- Smaller image has same file size
- Much larger file when converting JPG to BMP
- Resizing image results in larger file
User avatar
ouistiti
Posts: 353
Joined: Mon Oct 25, 2004 7:28 pm
Location: Belgique
Contact:

Post by ouistiti »

There are some lacunæ here… I guess that "Resizing" in order to reduce the file-size might be a single handling as one go. Obviously, It's not currently, and in other softs too. I think that some improvements would be welcome around that topic...

What about an option «Optimize the file size on the HD» :?:

Paul
L'important n'est pas de convaincre, mais de donner à réfléchir.
The important thing is not to convince, but to incite to think.

1,77245385090552...
Post Reply