Page 1 of 1
Resizing PSD moves layers slightly?
Posted: 2019-07-08T18:27:13-07:00
by anchsm
I'm resizing some large psd files (e.g. 6320 x 2880, 20+ layers) and in the resulting images, lots of the layers are shifted by a few pixels. They're not all shifted by the same amount or the same direction either, so their relative positions to each other has changed (i.e. I can't just add some kind of global offset to shift them back):
magick src_image.psd -resize 50% dst_image.psd
Windows 10 Pro, ImageMagick 7.0.8-51 Q8 x64
Re: Resizing PSD moves layers slightly?
Posted: 2019-07-09T11:11:18-07:00
by anchsm
More on this. Looking at a single layer's data in the input and output images:
src_image.psd:
Code: Select all
name "door 2"
uniname L"door 2"
width 547
height 291
top 111
left 5698
bottom 402
right 6245
opacity 255
flags 41
dst_image.psd (src_image.psd resized to 50%):
Code: Select all
name "door 2"
uniname L"door 2"
width 274
height 146
top 56
left 2854 (doubled is 5708 ...10 pixels off)
bottom 202
right 3128 (doubled is 6256 ...11 pixels off)
opacity 255
flags 1 (0x28 are missing)
width, height, top, and bottom look fine (if doubled they're off by one pixel, but they're uints, so it's just rounding).
left and right are wrong though. There's a whole 10 pixel offset that's got into the horizontal somehow.
Also some of the bit flags have been removed. I tried both settings of -define psd:additional-info, but it makes no difference to that.
Re: Resizing PSD moves layers slightly?
Posted: 2019-07-09T11:30:20-07:00
by fmw42
Upload your PSD file to some free hosting service that won't change the format and put the URL here so the developers can look at your image and see what might be happening. Note that Imagemagick currently has rather primitive PSD processing capabilities.