Pages: [1]   Go Down

Author Topic: Perspective Crop bug ?  (Read 5300 times)

Paul Ozzello

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 262
    • www.paulozzello.com
Perspective Crop bug ?
« on: April 08, 2013, 12:44:49 pm »


Hi,

When I use perspective crop to straighten an image the file size increases by 1GB (1880MB => 2900MB). Unlike standard crop there is no 'hide' or 'delete' option so I don't think it's any additional data is being saved. I tried setting front image, and the Image Size window shows the same image size (597MB) before and after cropping, the file types are the same, same number of layers and channels...

Is this a known issue ? I even tried the Microsoft Word approach of copying and pasting into a new document...

Really confused. Any ideas ?

Paul

Bart_van_der_Wolf

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 8914
Re: Perspective Crop bug ?
« Reply #1 on: April 08, 2013, 01:34:48 pm »

When I use perspective crop to straighten an image the file size increases by 1GB (1880MB => 2900MB).

Hi Paul,

Which software/version do you use?

Cheers,
Bart
Logged
== If you do what you did, you'll get what you got. ==

Paul Ozzello

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 262
    • www.paulozzello.com
Re: Perspective Crop bug ?
« Reply #2 on: April 08, 2013, 01:42:30 pm »

Hi Paul,

Which software/version do you use?

Cheers,
Bart

Ooops - Photoshop CS6 :)

I noticed that Window => Info Panel => Document Size increases after cropping, but only the number on the right, which would seem to indicate a new layer is being added (which is not the case).

Bart_van_der_Wolf

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 8914
Re: Perspective Crop bug ?
« Reply #3 on: April 08, 2013, 06:56:33 pm »

Ooops - Photoshop CS6 :)

I noticed that Window => Info Panel => Document Size increases after cropping, but only the number on the right, which would seem to indicate a new layer is being added (which is not the case).

Hi Paul,

Photoshop CS6 offers a possibility to recover cropped areas, in some dialogs. "Image|Reveal All" is the menu option to use for that. It will increase the in memory footprint, until the image is saved. Maybe that is what you are observing?

Cheers,
Bart
Logged
== If you do what you did, you'll get what you got. ==

Paul Ozzello

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 262
    • www.paulozzello.com
Re: Perspective Crop bug ?
« Reply #4 on: April 09, 2013, 12:26:50 pm »

Hi Paul,

Photoshop CS6 offers a possibility to recover cropped areas, in some dialogs. "Image|Reveal All" is the menu option to use for that. It will increase the in memory footprint, until the image is saved. Maybe that is what you are observing?

Cheers,
Bart

I'm not sure I understand. I get the impression that 'Perspective Crop' is destructive, there's no way of uncroping and the tool doesn't give you the option of 'deleting' or hiding. There are no new layers created after the crop and file size almost doubles. If I then flatten the image, it goes back to the original size so something is being saved elsewhere.


Redcrown

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 507
Re: Perspective Crop bug ?
« Reply #5 on: April 10, 2013, 12:41:19 am »

It is not clear where you are reading the "file size" that makes you think the size almost doubles.

Are you reading the "Scratch" sizes? If so, those numbers tell how much memory the document is using (and the maximum memory available). The Scratch size includes history states. So everytime you do something, the size increases, and can easily double. Cropping will increase that number because the uncropped version is still in memory history.

But that's not the true file size. You can't tell the true file size until you save the file. And then the file size will depend on format (tif, jpeg, PSD), bit-depth, and layers.

The "Document Size" in the info pallett is very misleading. It is reporting what size the saved document will be IF it is saved in the PSD format. Not the true file size for tif or jpeg.

If this does not answer your question, I suggest you post some screen shots. One before you crop and one after, and point to the numbers you are reading as file size.
Logged

Bart_van_der_Wolf

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 8914
Re: Perspective Crop bug ?
« Reply #6 on: April 10, 2013, 04:12:43 am »

I'm not sure I understand. I get the impression that 'Perspective Crop' is destructive, there's no way of uncroping and the tool doesn't give you the option of 'deleting' or hiding. There are no new layers created after the crop and file size almost doubles. If I then flatten the image, it goes back to the original size so something is being saved elsewhere.

Hi Paul,

I overlooked the fact that it is the Perspective Crop tool that you are using. With that, when you click the 'Clear button' in the option bar, the image will resize to a larger size when you pull one of the corner controls outside the original boundaries. Maybe that is what happened?

Cheers,
Bart
Logged
== If you do what you did, you'll get what you got. ==

Paul Ozzello

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 262
    • www.paulozzello.com
Re: Perspective Crop bug ?
« Reply #7 on: April 10, 2013, 12:02:22 pm »

It is not clear where you are reading the "file size" that makes you think the size almost doubles.

Are you reading the "Scratch" sizes? If so, those numbers tell how much memory the document is using (and the maximum memory available). The Scratch size includes history states. So everytime you do something, the size increases, and can easily double. Cropping will increase that number because the uncropped version is still in memory history.

But that's not the true file size. You can't tell the true file size until you save the file. And then the file size will depend on format (tif, jpeg, PSD), bit-depth, and layers.

The "Document Size" in the info pallett is very misleading. It is reporting what size the saved document will be IF it is saved in the PSD format. Not the true file size for tif or jpeg.

If this does not answer your question, I suggest you post some screen shots. One before you crop and one after, and point to the numbers you are reading as file size.

Hi, I'm referencing the actual size of the file on disk.

Here's an example:

The original tiff file size (72.9MB):



Open tiff in Photoshop CS6, convert background to layer, Save as 1.psd. the file size rougly doubles to 126MB which makes sense because of the layer:



Perspective Crop using "Front Image" (not 'Clear'), save as 2.psd, file size rougly doubles again to 205 MB !!



But everything is the same, no extra layers, no option to revert, Image AND Canvas sizes are the same, but both the Info Palette and the file size are double.

Image Size Dialog:



Photoshop Screen BEFORE Crop


Photoshop Screen AFTER Crop


Redcrown

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 507
Re: Perspective Crop bug ?
« Reply #8 on: April 10, 2013, 04:00:39 pm »

Paul,

Thanks for all the detail on your problem. I was finally able to duplicate the problem and learned something in the process. My tests indicate the problem is a combination of three factors:

1. The PSD file format.
2. Layered files (Even a Layer 0 background).
3. The Perspective Crop tool (and any Transform).

If I change any of those factors, the strange file size increase does not occur. Does not happen using Tif format. Does not happen on flat files. Does not happen with the normal crop tool. But it does happen if I Edit/Transform/Distort the layer, same as Perspective Crop.

I can't find an explanation of why this unique combination gives such a mysterious increase in file size. Probably a bug. The obvious solution is don't use PSD. Use Tif instead.

What I learned is that changing a single background layer to an editable "Layer 0" actually creates a multi-layerd file, even though only one layer appears in the Layers Pallet. I did not know that.
Logged

Redcrown

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 507
Re: Perspective Crop bug ?
« Reply #9 on: April 11, 2013, 02:29:28 am »

I revisited this issue and realized there is a 4th factor - 8bit vs. 16bit. The strange file size increase only occurs on 16bit + PSD + layered + Pcropped files. On an 8bit version, the file size after the Perspective Crop is actually a little smaller (by the amount of the crop).

I love a mystery, especially when it's cold and raining and there is nothing better to do.
Logged

Redcrown

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 507
Re: Perspective Crop bug ?
« Reply #10 on: April 11, 2013, 02:51:58 am »

A bit of little known trivia about files sizes, not releavent to the problem discussed in this thread, but related.

The PSD "compatibility" option has a bug that's been around for years. If you set "no compatibility" on a PSD file and the image is truly flat, you get a compatibility copy in the file anyway, and a larger file size. Photoshop honors the no compatibility option only on layered PSD files. Save a flat PSD file with no compatibility. Then add a blank do-nothing layer and save another version. That second layered version will be smaller than the first flat version.

Look at both files with a non-Adobe browser like FastStone. It will display the flat file but not the layered file, because the flat file has an embedded copy, even if you told it not to do that.

Tif files always have a compatibility version embedded. No way to turn it off. Any non-Adobe can read and process Tif files, layered or flat.

The embedded "compatibility" copy in a PSD file is an 8-bit jpeg. The embedded copy in a Tif file is a true Tif image. It is lossless and it is whatever bit depth you saved the Tif in (8 or 16). These differences are important when you feed Tifs or PSDs to 3rd party programs like HDR processors, because they all use the embedded copy and thus get whatever quality it is in. Feeding a 16bit lossless Tif to HDR programs is better than feeding PSDs.

Tif files have compression options: LZW, ZIP, or none. The LZW option does NOT work well on 16bit files. It creates files that are actually larger than if no compression was used.

PSD and TIF files also have significant differences in their load and save times, depending on bit depth and compression options. Choice of format is thus a trade off between file size and speed.
Logged

Paul Ozzello

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 262
    • www.paulozzello.com
Re: Perspective Crop bug ?
« Reply #11 on: April 11, 2013, 12:06:35 pm »

A bit of little known trivia about files sizes, not releavent to the problem discussed in this thread, but related.

The PSD "compatibility" option has a bug that's been around for years. If you set "no compatibility" on a PSD file and the image is truly flat, you get a compatibility copy in the file anyway, and a larger file size. Photoshop honors the no compatibility option only on layered PSD files. Save a flat PSD file with no compatibility. Then add a blank do-nothing layer and save another version. That second layered version will be smaller than the first flat version.

Look at both files with a non-Adobe browser like FastStone. It will display the flat file but not the layered file, because the flat file has an embedded copy, even if you told it not to do that.

Tif files always have a compatibility version embedded. No way to turn it off. Any non-Adobe can read and process Tif files, layered or flat.

The embedded "compatibility" copy in a PSD file is an 8-bit jpeg. The embedded copy in a Tif file is a true Tif image. It is lossless and it is whatever bit depth you saved the Tif in (8 or 16). These differences are important when you feed Tifs or PSDs to 3rd party programs like HDR processors, because they all use the embedded copy and thus get whatever quality it is in. Feeding a 16bit lossless Tif to HDR programs is better than feeding PSDs.

Tif files have compression options: LZW, ZIP, or none. The LZW option does NOT work well on 16bit files. It creates files that are actually larger than if no compression was used.

PSD and TIF files also have significant differences in their load and save times, depending on bit depth and compression options. Choice of format is thus a trade off between file size and speed.

Hi Redcrown,

Those are really good observations and my files are indeed 16 bit. After reading your posts I decided to save the file with Maximize Compatibility OFF and the file size reduced significantly. My 'base' file reduced from 1880MB to 1312MB, and after p-cropping from 2880 MB to 1880 MB. Still larger than before the crop but much more manageable.

Any idea how to trim it even more ?

Paul

Redcrown

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 507
Re: Perspective Crop bug ?
« Reply #12 on: April 11, 2013, 04:33:49 pm »

Yes, turning off compatibility on layered PSD files will reduce the size. But the Perspective Cropped version will still be considerably larger for some unknown reason.

To get smaller files, either:

1. Don't use PSD, use Tif instead. No problem there.

2. If you continue to use PSD, don't unlock the Backgdound layer and make "Layer 0". No need to do that. Of if you do, flatten the file before saving.


I've never used Perspective Crop before this. I use Edit/Transform instead. But as I noted above, even Edit/Transform causes the strange file size increase under the right conditions. No big surprise since they both do the same thing.

I studied the PSD vs. Tif debate and did some testing long ago. As a result, I use Tif with no compression on 16 bit files and Tif with LZW compression on 8 bit files. That, for me, is the best compromise between speed and size. The Tif with ZIP compression makes just slightly smaller files, and works OK on 16bit, but the ZIP compression is much slower than LZW.

One of my test examples:

A file saved as 16bit layered PSD with no compatibility was 109MB and saved in 9.8 seconds. The same file saved as 16bit Tif no compression was 120MB and saved in 0.2 seconds. I choose to trade the Tif's 10% file size increase for the 490% speed advantage.

The same file saved as 8bit was a 62MB PSD and a 36MB Tif, and the Tif saved much faster of course. No contest on 8bit files.
Logged

Paul Ozzello

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 262
    • www.paulozzello.com
Re: Perspective Crop bug ?
« Reply #13 on: April 12, 2013, 03:52:26 pm »

Yes, turning off compatibility on layered PSD files will reduce the size. But the Perspective Cropped version will still be considerably larger for some unknown reason.

To get smaller files, either:

1. Don't use PSD, use Tif instead. No problem there.

2. If you continue to use PSD, don't unlock the Backgdound layer and make "Layer 0". No need to do that. Of if you do, flatten the file before saving.


I've never used Perspective Crop before this. I use Edit/Transform instead. But as I noted above, even Edit/Transform causes the strange file size increase under the right conditions. No big surprise since they both do the same thing.

I studied the PSD vs. Tif debate and did some testing long ago. As a result, I use Tif with no compression on 16 bit files and Tif with LZW compression on 8 bit files. That, for me, is the best compromise between speed and size. The Tif with ZIP compression makes just slightly smaller files, and works OK on 16bit, but the ZIP compression is much slower than LZW.

One of my test examples:

A file saved as 16bit layered PSD with no compatibility was 109MB and saved in 9.8 seconds. The same file saved as 16bit Tif no compression was 120MB and saved in 0.2 seconds. I choose to trade the Tif's 10% file size increase for the 490% speed advantage.

The same file saved as 8bit was a 62MB PSD and a 36MB Tif, and the Tif saved much faster of course. No contest on 8bit files.

The person I send them to for printing wants psb files with the original adjustment layers so that he can tweak them as necessary. My files are still large but more manageable, and I can live with it until they fix it in a future version... I'm also long overdue for a hardware upgrade :)

Thanks for all the help !

Paul

Bart_van_der_Wolf

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 8914
Re: Perspective Crop bug ?
« Reply #14 on: April 12, 2013, 05:01:05 pm »

The person I send them to for printing wants psb files

Paul,

PSBs offer no benefit over TIFFs.
TIFFs can do everything PSB can do, and more.

Cheers,
Bart
Logged
== If you do what you did, you'll get what you got. ==
Pages: [1]   Go Up