Image file size
Posted 24 May 2011 - 07:33 AM
I'm newb and want to create images with minimal file size using .net.
Posted 24 May 2011 - 08:28 AM
If you're after *.jpg files, reduce the quality slider when saving and you'll get a new file size along with the preview.
If you want *.png files, I recommend downloading and installing the OptiPNG plugin.
What file format were you after?
ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab
plugins: Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker
Posted 21 June 2011 - 02:54 PM
>> want to create images with minimal file size using .net
I've often wanted to do the same - basically because I keep a lot of scanned images and want to preserve my disc space.
So I've done a fair bit of experimenting over the years to compare file sizes with subjectively equivalent quality.
Nearly always it has come down to a choice between .jpg and .png. I haven't used OptiPNG plugin, though. I may give it a try. But simply by experimenting with the values that are presented in the PDN dialogues, I've found the following for scanned images:
.jpg is nearly always the smallest option.
.png is very occasionally smaller - usually, I have the impression, when the original has large blocks of identical colour - like a computer generated map, some Google maps, for example, but very often a .png can be an order of magnitude larger file size than an equivalent quality .jpg.
To get optimal file size and quality one needs (obviously) to start with a picture that has an optimal number of pixels for the level of detail in the image. An A4 page of text, for example, scanned at 300 dpi, will often suffer almost no perceptible reduction in quality if you reduce it effectively to 150 dpi by reducing the image size by 50% (Image->Resize, By Percentage 50%). This, of course, reduces the number of pixels to be encoded down to one quarter 'right off the bat'. I commonly do this and then reduce the .jpg image Quality down to 25%. Any smaller than 25% seems to start introducing an intrusive blur around text making it more difficult/tiring to read. For this kind of image this usually seems to me to be about optimum (150 dpi .jpg at 25% quality). If you reduce the dpi much more than that, then the blur begins to hit at a much higher quality setting, so that what you gain, in having less pixels to encode, is more than lost in quality or in having to encode the .jpg at a less 'lossy' setting.
For photographic images - depending upon the subject, you can often get away with a lower .jpg quality setting without much perceptible quality loss. It depends if you want to be able to print out the picture or view it or the screen. Typically you'll need a much higher quality if you want to produce a reasonable looking printed image. The brain seems to let you get away with a lot more on a screen before it shouts.
If you do some experiments and come up with different values, I'd be interested to known what you find.