This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Welcome to the JavaRanch. JPEG is a compression format so it is quite possible that a "larger" image size on screen could be shrunk down smaller on disk than a "smaller" display size, depending on the content of the image. Without knowing exactly what the images contain we can only speculate.
JPEG applies various algorithms to compress the image. Those may work better on one image than the other (they depend on the image content).
An extreme example would an image that is 1 million pixels large, but all pixels have the same color: that would be much smaller than an image that's 10000 pixels large, yet contains 10000 different pixel values.
PS: Which, as I now see, is just about the same Joe said. [ June 26, 2008: Message edited by: Ulf Dittmer ]
Joined: Jun 26, 2008
Thanks a lot.....
I am studing lossless image compression.
I use a jpg image of 200 kb as input image. I applied 3 lossless image compression techniques, decompress it,and saved them as .jpg images using above code. All 3 files are look like original image and each image size is 120 kb.
when I save original 200 kb image as .bmp it gives 300kb bmp image. also when I save 120 kb image as .bmp it also gives 300kb bmp image.
Also.. when I save original 200 kb image again as .jpg it gives 200kb jpg image.
and when I save 120 kb image as .jpg it gives 130kb jpg image.
then why the size is different 200 and 120 as I am using lossless compresion techniques.(ie.input pixel data is same as output pixel data)