Page 1 of 1

Problem writing PSB for Photoshop CS6

Posted: 2017-12-05T10:21:09-07:00
by textureLand
Greetings --
I am having troubles creating PSB files that can be read in Adobe Photoshop CS6.
When I try to load a PSB file created by ImageMagick's "convert" command , I see this error:

Adobe Photoshop CS6
Could not complete your request because the file is not compatible with this version of Photoshop.

PSD files load into Photoshop CS6 OK.
I do not have access to Photoshop CC.
This problem is with PSB files.
I want support for the large format size: PSB

This used to work.
Version 6.9.2-10 creates PSB files that load OK into PS CS6.
Version 6.9.3-10 (and newer) creates files that will not load (show error above).
I have not found a version in the "ImageMagick 7" series that creates valid PSB files.

This command creates a red PSB file:
convert.exe -size 900x900 xc:#aa2211 +matte -depth 8 -compress None -type TrueColor red3.psb

When run with "convert" with version 6.9.2-10, the PSB file loads into Photoshop CS6 fine (PSB file is 2.3MB).
When run with "convert" with version 6.9.3-10, the PSB file will not load into Photoshop CS6 (PSB file is 4.7MB).

I built each version of ImageMagick from source, creating static executables.
I looked at the differences in coders/psd.c between the two different versions, but didn't see an obvious reason for my problem.

ImageMagick will read PSB files from Photoshop CS6.
Both versions of ImageMagick can convert each PSB files to another format.
Both can convert any of these PSB files to PSD, and Photoshop loads them OK.

The "bad" PSB files appear to be twice as large as they need to be, and from the output of "identify" -- looks like the "bad" PSB files have a second page or image included.
I don't know how to turn this off, and have ImageMagick only write the one internal image per file.

In case version information helps:

Version info for 6.9.2 convert:
Version: ImageMagick 6.9.2-10 Q8 x64 2017-12-05 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Visual C++: 180040629
Features: Cipher Debug DPC OpenMP
Delegates (built-in): bzlib cairo freetype jng jp2 jpeg lcms lqr openexr pangocairo png ps rsvg tiff webp xml zlib

Version info for 6.9.3 convert:
Version: ImageMagick 6.9.3-10 Q8 x64 2017-12-05 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Visual C++: 180040629
Features: Cipher Debug DPC OpenMP
Delegates (built-in): bzlib cairo flif freetype jng jp2 jpeg lcms lqr openexr pangocairo png ps rsvg tiff webp xml zlib


I would appreciate some help with this problem.

Re: Problem writing PSB for Photoshop CS6

Posted: 2017-12-05T11:18:21-07:00
by fmw42
I tried this command on IM 6.9.9.25 Q16 Mac OSX and it fails to open in several tools such as GIMP, Preview and GraphicConverter. I did not try Photoshop.

Code: Select all

convert -size 900x900 xc:"#aa2211" -depth 8 PSB:red3.psb
So some thing has changed if you say it worked on earlier versions.

Re: Problem writing PSB for Photoshop CS6

Posted: 2017-12-05T11:26:40-07:00
by fmw42
I also tried the command using IM 6.9.1.2 and 6.9.4.0 as well as 6.9.9.25. The only one that opened properly in Photoshop CS (very old) was the one created with 6.9.1.2.

So there is a bug in more current versions that 6.9.1.2 or as the OP says between 6.9.2.10 and 6.9.3.10

Re: Problem writing PSB for Photoshop CS6

Posted: 2017-12-26T11:49:03-07:00
by dlemstra
I just pushed a fix for this to our git repository. Can you give it a try with the latest beta tomorrow?

Re: Problem writing PSB for Photoshop CS6

Posted: 2017-12-26T11:52:12-07:00
by fmw42
Dirk,

I will test tomorrow with the new beta.

Re: Problem writing PSB for Photoshop CS6

Posted: 2017-12-28T12:35:13-07:00
by textureLand
Greetings --

I tested using "ImageMagick-7.0.7-17-Q8-x64-dll.exe" as of (2017-12-27 14:59 26M).
Photoshop CS6 reads the PSB files created from this version.
Thanks for making this work!

The process creates an "L1" layer in the PSB file, as reported by Photoshop (instead of just a "Background" layer).
This means the file is saved with the image twice, and the PSB file is twice as large as needed.
(the "L1" layer is saved to PSB, as well as the composited layer -- which is exactly the same as the L1 layer)

In one example -- I ran ImageMagick to composite 2x2 8192x8192 images into a PSB file (resulting in a 16384x16384px RGB image, 8 bits/pixel).
ImagMagick's output file was 1.6GB. And Photoshop saves that image as a 1.6GB file.
Once I flatten all layers in Photoshop to a Background layer, Photoshop saves the PSB file as an 800MB image.
In both cases, Photoshop lists the size of the document as 768MB

Even including the command "-flatten" on the ImageMagick command-line result in the L1 layer.

I tried to load a PSB file in Gimp, but my version (2.8.22) does not appear to support PSB files; Gimp reports: "Error loading PSD file: Unsupported file format version: 2"

Again -- many thanks for making PSB files work again.

Re: Problem writing PSB for Photoshop CS6

Posted: 2018-01-03T05:51:15-07:00
by localstarlight
Hi,

I am using the latest Windows binary of Image Magick, and having this same problem. When I create a .psb and try to open it in Photoshop, it says, "Could not complete your request because the file is not compatible with this version of Photoshop."

I am using the latest version of Photoshop (2017).

Any idea when the binary will be fixed, or will I need to build from source?

Thanks!

Re: Problem writing PSB for Photoshop CS6

Posted: 2018-01-03T08:53:43-07:00
by textureLand
I tested this today on Win7 with the newest version:
convert --version
Version: ImageMagick 7.0.7-19 Q8 x64 2018-01-01

I created a simple PSB image:
convert -size 900x900 xc:"#aa2211" -depth 8 PSB:red3.psb

This PSB file reads fine into Photoshop CS3 and CS6 (I don't have access to Photoshop CC).

Previously, I had the same problem with Photoshop not reading PSB files.
This was fixed around 12/26.
I did not have to build from source.

Re: Problem writing PSB for Photoshop CS6

Posted: 2018-01-03T12:49:55-07:00
by localstarlight
I'm able to download old versions of PS with CC, so I just downloaded and tried opening the .psb on Photoshop CS6, and it comes up with the same error.

I am using this version of Image Magick: ImageMagick-7.0.7-19-Q16-x64-dll.exe

The psb is being created using the montage command to stitch together a lot of 256x256 jpeg tiles. Here is the command I'm using to create it:
montage -mode concatenate -tile 64x *.jpg Map_Scale_6.psb

This same command works fine for outputting a .tiff file, but the .psb is not working.

Re: Problem writing PSB for Photoshop CS6

Posted: 2018-01-03T14:01:17-07:00
by textureLand
> montage -mode concatenate -tile 64x *.jpg Map_Scale_6.psb

Sounds like your "montage" command is from an earlier version of ImageMagick,
while you have updated the "magick" command to 7.0.7-19.
That would explain the results you see.

I just tried this:
magick montage -mode concatenate -tile 20x q*.tif psb:new.psb

The resulting PSB file loaded into Photoshop CS6 just fine.

$ magick --version
Version: ImageMagick 7.0.7-19 Q8 x64 2018-01-01

Re: Problem writing PSB for Photoshop CS6

Posted: 2018-01-03T14:55:50-07:00
by localstarlight
Ah, that did it! Works now, thanks.

I copy-pasted the basis for that command from quite an old forum thread it seems, didn't realise it had changed.

Thanks so much!