There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
access audio avg avg 8 bios blue screen boot bsod computer connection cpu crash css dell desktop dma driver drivers dvd email error excel explorer firefox firefox 3 freeze gimp graphics hard drive hardware hijackthis hjt install internet internet explorer itunes keyboard laptop macro malware monitor motherboard network networking outlook outlook 2003 outlook 2007 outlook express pio problem problems router seo server slow sound sp3 spyware trojan usb video virtumonde virus vista vundo windows windows vista windows xp winxp wireless
Digital Photography & Imaging
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Software & Hardware > Digital Photography & Imaging >
Imagesize changing in Photoshop


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

 
Thread Tools
stb2's Avatar
Junior Member with 16 posts.
 
Join Date: Aug 2004
Location: Copenhagen, Denmark
Experience: Intermediate
24-Aug-2004, 07:59 AM #1
Imagesize changing in Photoshop
I had an experience with two cameras that puzzled me considered what I know about DPI, PPI and Kb. I have talked about this on another forum, but were considered if not stupid, then very close, and got no answer.
So I hoped that someone here could explain to me what Photoshop is doing to the images.

It all started with me doing some size changing to images from 2 different cameras.

New camera (megapixel) (PPI of images) (DPI output):
Olympus UZ-750 (4) (2288x1712) (72)

Old camera:
Canon Powershot a10 (1,3) (1280x960) (180)

I were going to use the images on internet, so filesize had to be low. I set the images to 640 x 480 and saved in a very low jpeg quality, still looking ok.
But I realized that with images from the old camera, I were able to scroll to a lower image quality, looking the same as images from the new. That resulted in an average of more that 20 Kb lower image size wich is important on the net. So now I consider the old camera better than the new. is it?

When looking at the DPI differences of the cameras, I thought "no it can't be that" and it made me make some tests wich made it even more wierd.

I made these 4 images with only white color:

1 - 10 x 10 px - 640 DPI - 12.672 byte
2 - 10 x 10 px - 72 DPI - 12.670 byte
3 - 1 x 1 px - 640 DPI - 12.657 byte
4 - 1 x 1 px - 72 DPI - 12.655 byte

I changed them, saved them and read there size again. 1,3 means that I loaded image 1 and changed it into image 3's specs and so on.

Changing PPI
1,3 - 1 x 1 px - 640 DPI - 12.971 byte
2,4 - 1 x 1 px - 72 DPI - 12.971 byte
3,1 - 10 x 10 px - 640 DPI - 12.988 byte
4,2 - 10 x 10 px - 72 DPI - 12.990 byte

Why has it suddently changed the file size, when it became the same file?

Changing PPI and DPI
1,4 - 1 x 1 px - 72 DPI - 12.971 byte
2,3 - 1 x 1 px - 640 DPI - 12.973 byte
3,2 - 10 x 10 px - 72 DPI - 12.986 byte
4,1 - 10 x 10 px - 640 DPI - 12.988 byte

Changing DPI
1,2 - 10 x 10 px - 72 DPI - 12.986 byte
2,1 - 10 x 10 px - 640 DPI - 12.988 byte
3,4 - 1 x 1 px - 72 DPI - 12.971 byte
4,3 - 1 x 1 px - 640 DPI - 12.973 byte

Why does it sometimes change size when changing DPI?
Cheeseball81's Avatar
Moderator with 71,506 posts.
 
Join Date: Mar 2004
Location: New York
Experience: Mighty Nerdy
24-Aug-2004, 10:21 PM #2
Won't it change size in Photoshop if "Constrain Proportions" is checked?

Wouldn't it scale it down?
stb2's Avatar
Junior Member with 16 posts.
 
Join Date: Aug 2004
Location: Copenhagen, Denmark
Experience: Intermediate
25-Aug-2004, 08:45 AM #3
Either you are way off or I don't understand what you are asking me.

I don't have a problem I need help with, I need an explanation to my experience.
slipe's Avatar
Distinguished Member with 6,471 posts.
 
Join Date: Jun 2000
Location: Tampa Bay
25-Aug-2004, 11:10 AM #4
I don’t know that a file can be 12.672 bytes. Bytes generally have to be whole numbers. Even if you are getting incomplete files without sufficient bits it would be a divisor of 8. 16 if you are using raw and extracting to 16 bit. I think you must be getting kb, or thousands or bytes.

A 10 X 10 pixel file would be 10 X 10 X 3, or 300 bytes just to represent the pixels. So the difference you are getting in 12,000+ byte files has little to do with the pixels you are representing and a lot to do with the internal workings of the JPG. Since your 1 X 1 files are about the same size as your 10 X 10 although they are 1/100 the size that should be obvious to you.

As far as actually representing your pixels there would be no difference in PPI, which is just an internal tag in the JPG in case you want to print it. Evidently the 640 PPI tag takes two more bytes to represent than 72 PPI. A file shouldn’t really be in DPI even though the tag is basically a printing instruction.

The difference between your cameras can be several things. You get much less noise from the sensors that are less densely packed on your Canon. High JPG compression develops more severe artifacts sooner with higher noise – it is not unusual IMO to be able to compress the lower noise images from your Canon more. 4.1Mp in a 1/2.5 Type CCD has a lot more density than 1.25Mp in a 1/2.7 sensor. Another difference in file size can be the information carried in the EXIF. Some cameras extract things like small thumbnails in the EXIF. Try saving in Irfanview with everything unchecked – this is the box you get that lets you avoid saving anything but image information. You shouldn’t extract anything but the image for web use. Progressive is OK:


If you want an overview of what those 12,000+ bytes in your files represent you can start with this, which is the simplest explanation I know of. It doesn’t let you do the kind of file size analysis you are looking for, but it gives you an idea of the complexity in the file itself.
” The JPEG algorithms performs its compression in four phases:
First, the JPEG algorithms first cuts up an image in separate blocks of 8x8 pixels. Since the format is based on luminance/chrominance perception, it does not analyse RGB or CMYK colour values but instead converts image data to a luminance/chrominance colour space, such as YUV. This allows for separate compression of these two factors. Since luminance is more important than chrominance for our visual system, the algorithm retains more of the luminance in the compressed file.
The next step in the compression process is to apply a Discrete Cosine Transform (DCT) for the entire block. DCT is a complex process that is let loose on each individual pixel. It replaces actual colour data for each pixel for values that are relative to the average of the entire matrix that is being analysed. This operation does not compress the file, it simply replaces 8x8 pixel values by an 8x8 matrix of DCT coefficients.
Once this is done, the actual compression can start. First the compression software looks at the JPEG image quality the user requested (remember PhotoShop 'low quality', 'medium quality',...) and calculates two tables of quantization constants, one for luminance and one for chrominance. Once these tables have been constructed, the constants from the two tables are used to quantize the DCT coefficients. Each DCT coefficient is divided by its corresponding constant in the quantization table and rounded off to the nearest integer. The result of quantizing the DCT coefficients is that smaller, unimportant coefficients will be replaced by zeros and larger coefficients will lose precision. It is this rounding-off that causes a loss in image quality.
The resulting data are a list of streamlined DCT coefficients. The last step in the process is to compress these coefficients using either a Huffman or arithmetic encoding scheme. Usually Huffman encoding is used. This is a second (lossless) compression that is applied.”


If you really want to know what is going on inside the file you might want to start with this: http://www.amazon.com/exec/obidos/IS...288510-1379123 Once you understand it you can come back and help out duffers like me.

If you want to break down the compression algorithms and notation protocols within a JPG it will take you a while and not contribute much to your empirical knowledge of what you can do with the images. My suggestion is for you to stick with real-world empirical experiments to determine what you get from actual images rather than screw around with theoretical understandings.

Edit: I ran your test of making JPG files from a 10 X 10 pixel all white image. At low quality I got 8kb and at all other qualities I got 9kb. Irfanview at best quality (100) gave a 2kb file. Oddly Irfanview does not compress TIFFs in LZW or ZIP and PNG as well as Photoshop.

I figured out where your numbers came from as well. You are substituting a period for a comma. If you are saving a 10 X 10 pixel white image as JPG I have no idea why you are getting bigger files. Using all three JPG options I get 8-9k in Photoshop 7. The reason all of the qualities are about the same size is that a pure white image just has to store 255 in three colors and multiply them by the pixels. It will compress pretty much the same for all qualities. Again it isn’t a real-world indication of anything in particular.

Mike Chaney, who wrote QImage answers questions on the QImage board over a Steve’s. He might have an in-depth understanding of what is going on inside the JPG file. http://www.stevesforums.com/forums/view_forum.php?id=33
__________________
if you can keep your head while others around you are losing theirs then there is something you don't know

Last edited by slipe : 25-Aug-2004 04:15 PM.
stb2's Avatar
Junior Member with 16 posts.
 
Join Date: Aug 2004
Location: Copenhagen, Denmark
Experience: Intermediate
27-Aug-2004, 08:42 AM #5
Thanks a lot for your answer!

The first real one.

Quote:
I don’t know that a file can be 12.672 bytes
Quote:
I figured out where your numbers came from as well. You are substituting a period for a comma.
Well I am not, I guess it is just a difference in my Danish and your English version of Windows XP. In your's I am sure it would be 12,672 (I copy/pasted from file information or what it is called when you right click on a file).
Read in Kb files 1,2,3 and 4 would be 12,3 Kb all others would be 12,6 Kb.

My test was really about checking if photoshop had some sort of impact on images file size, when changing their specifics. Well it did a little, but you are right it does not prove anything about the images from the cameras. Those images were changed in file size because of me changing image quality.
But had the images a better quality from the start, or did photoshop make some changes, making me able to change the quality.

The reasons I did all this were because I am looking for a camera (the two others is not mine). So if my experience concluded that images in 180 DPI was somehow changed in photoshop, so it enabled them to save in lower quality, then I were looking for that.

But you think it is all about how the two cameras save the jpegs and not about the DPI?

But I will read more about it from your links, cause if DPI really has nothing to do with PPI as people tend to say, then why does one change in Photoshop when changing the other.

Thanks again for your thorough reply.
slipe's Avatar
Distinguished Member with 6,471 posts.
 
Join Date: Jun 2000
Location: Tampa Bay
27-Aug-2004, 12:41 PM #6
Quote:
I guess it is just a difference in my Danish and your English version of Windows XP. In your's I am sure it would be 12,672 (I copy/pasted from file information or what it is called when you right click on a file).
Read in Kb files 1,2,3 and 4 would be 12,3 Kb all others would be 12,6 Kb.
Interesting. I never knew Europeans (or Danes) wrote twelve thousand six hundred seventy two as 12.672. Seems it would get confusing.

Your “tests” show what most people already know – that a box of one color is highly compressible. You are discovering small housekeeping differences in the JPG file rather than anything you can use with real images.

Different images compress differently. The higher the compression the greater the difference. It isn’t unusual at all for two images of exactly the same size in pixels to store in kb with one over twice the size of the other at high compression. Even at higher quality, images from just one folder directly from the camera vary between 991 and 1,632 kb in one I just looked at on my HD..

You don’t seem interested in checking whether the images are being saved with EXIF information as I suggested. The difference can be at least 20k between saving with and without EXIF. That is constant regardless of image size and compression quality. Until you sort out your variables you can’t know what is going on.

Quote:
But I will read more about it from your links, cause if DPI really has nothing to do with PPI as people tend to say, then why does one change in Photoshop when changing the other.
Saving for the web you are interested in the pixels. If you want the image to be 600 pixels wide set 600 in the width with “constrain proportions” and “resample” checked. PPI is dependent on the print size you have selected and is meaningless for screen display. DPI is dependent on your printer and the PPI. The PPI that your 600 pixel wide image will display onscreen is dependent on the resolution set for the monitor.

Quote:
But you think it is all about how the two cameras save the jpegs and not about the DPI?
It is possible that images from a camera with less densely packed sensors might compress a little better. But if you are resampling to the same size for both and then compressing to the same size in kb I don’t think there would be a lot of difference.

Some cameras extract JPGs at higher quality than others. Some have a true SHQ JPG which is almost quality 12 in Photoshop. Others are about quality 7 as best JPG. Some people also go cheap on their memory card and shoot at a lower JPG quality. It might not seem intuitive, but you want as high a quality JPG as you can start with to compress to a low quality (high compression) JPG. By compressing to a lower quality you are enhancing JPG artifacts that were in the original image. You can get a much more highly compressed and smaller image of decent quality from an image that was captured by the camera at higher quality JPG.

My guess is that if you iron out all of your variables there won’t be much difference between the images.
__________________
if you can keep your head while others around you are losing theirs then there is something you don't know

Last edited by slipe : 27-Aug-2004 12:46 PM.
stb2's Avatar
Junior Member with 16 posts.
 
Join Date: Aug 2004
Location: Copenhagen, Denmark
Experience: Intermediate
27-Aug-2004, 05:24 PM #7
Quote:
Interesting. I never knew Europeans (or Danes) wrote twelve thousand six hundred seventy two as 12.672. Seems it would get confusing.
And we use "," as you use ".". So your way to us would be: twelve point six hundred seventy two. Just as confusing for us.
We just do it opposite.
Quote:
Different images compress differently. The higher the compression the greater the difference. It isn’t unusual at all for two images of exactly the same size in pixels to store in kb with one over twice the size of the other at high compression. Even at higher quality, images from just one folder directly from the camera vary between 991 and 1,632 kb in one I just looked at on my HD..
I know, that is why I made shure there were a difference by calculating an average of 333 images in total from the cameras. And the difference were more than 20 Kb.
Quote:
You don’t seem interested in checking whether the images are being saved with EXIF information as I suggested. The difference can be at least 20k between saving with and without EXIF. That is constant regardless of image size and compression quality. Until you sort out your variables you can’t know what is going on.
Sorry missed that one. All 4 APP markers is checked in images from both cameras. But I know why they are smaller, I saved them in lower quality, but I don't know why I were able to do that, images looking the same.
Isn't photoshop able to remove APP markers? I should do that next time using images on the web.
Quote:
Saving for the web...
I have misunderstood PPI. I thought it was the same as pixel size. So what I really ment to say were: But I will read more about it from your links, cause if DPI really has nothing to do with pixel size as people tend to say, then why does one change in Photoshop when changing the other.
Quote:
It is possible that images from a camera with less densely packed sensors might compress a little better. But if you are resampling to the same size for both and then compressing to the same size in kb I don’t think there would be a lot of difference.
As written before I set images from both cameras to 640 x 480 and 72 DPI, but were able to compress images from the old camera more, still looking like the same quality as the new. That is what resulted in the filesize difference.
Quote:
Some have a true SHQ JPG which is almost quality 12 in Photoshop. Others are about quality 7 as best JPG.
I don't know if one can do this calculation, but just as an example. So if the new camera itself saves in 7 and I open in PS and save it in 12, then it is still "7". But lowering it to 8 would make it like "3" and then have image quality like 3 but size like 8. The old camera saving in 12 could then be lowered to 3 too and have both size and quality according to that?
buck52's Avatar
Distinguished Member with 8,160 posts.
 
Join Date: Mar 2001
Location: Mass.
27-Aug-2004, 05:29 PM #8
I'm getting a headache just thinking about it ...

What is it that you are trying to accomplish...if anything?

Are you happy with the output from your cameras?

buck
stb2's Avatar
Junior Member with 16 posts.
 
Join Date: Aug 2004
Location: Copenhagen, Denmark
Experience: Intermediate
27-Aug-2004, 05:57 PM #9
Well I think Slipe is doing quite good with me here.
My purpose of all this is figuring out what the old camera has that the new lacks, so I know what to choose from, finding my new digital camera.
slipe's Avatar
Distinguished Member with 6,471 posts.
 
Join Date: Jun 2000
Location: Tampa Bay
27-Aug-2004, 06:36 PM #10
Quote:
As written before I set images from both cameras to 640 x 480 and 72 DPI, but were able to compress images from the old camera more, still looking like the same quality as the new. That is what resulted in the filesize difference.
When you set 640 X 480 on most cameras you are going to a high compression/low quality. Probably about a 4 or 5. If you open it in Photoshop and save as a 12 you have slightly decreased the quality of the original 4 – not much though. If you save the original again as a quality 4 you end up with a poor image because the original compression artifacts are enhanced in the second compression.

You can compare the image sizes as they come from the camera to get an idea of the JPG quality. Generally the larger the file the higher the quality it saved at. That is very hard to do at very high compression because the images vary so much though.

The only fair way to compare the two cameras is to take the images at best quality, and that means largest size in most cameras. A high quality image at full size will compress better for you to a given size than starting with a small low quality image. The reason for that is that the high quality image starts with fewer compression artifacts.

You also want to eliminate the EXIF to compare how well they compress to a certain file size. I would guess you could do that in Photoshop somewhere in preferences, but you would have to change them back to save EXIF. I’ve used Photoshop since version 3 and still would not be without Irfanview. It is easier to do some things with Irfanview and it opens almost instantly.

I guess nobody is going to convince you that for what you are doing a 640 X 480 image at 72PPI is exactly the same as a 640 X 480 at 150PPI or 300 PPI. The only difference is at what size and PPI it will print. They are all 640 X 480 images viewed online or on your monitor. Uncheck “resample” and change the PPI in Photoshop. The print size will change but not the image size. Change the print size and the PPI will change but not the image size. When you uncheck “resample” you are telling Photoshop to not change the actual image.
__________________
if you can keep your head while others around you are losing theirs then there is something you don't know
stb2's Avatar
Junior Member with 16 posts.
 
Join Date: Aug 2004
Location: Copenhagen, Denmark
Experience: Intermediate
27-Aug-2004, 07:55 PM #11
Quote:
The only fair way.../...to a certain file size.
I don't have the full size files here. I will get them soon and when I do I will try the same thing using irfanview. Should I remove all APP markers or just EXIF?

Quote:
A high quality image at full size will compress better for you to a given size than starting with a small low quality image. The reason for that is that the high quality image starts with fewer compression artifacts.
Now you confuse me, exactly the opposite happened. So could the new cameras saving capabilities be so bad that it would reverse that.

Quote:
I guess nobody is going to convince you...
I am convinced, but still confused. And I don't know the lacks of the new camera yet.
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are Off
Refbacks are Off

You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 08:47 PM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.