Skip to content

[Bug] 8 bit Grayscale images from Adobe appear pink after transform, when imageTransformOutputStripImageHead is set to false #1054

@mthomsonnz

Description

@mthomsonnz

Is there an existing issue for this?

  • I have searched the existing issues

Have you updated FilePond and its plugins?

  • I have updated FilePond and its plugins

Describe the bug

I am uploading 8 bit grayscale images from Adobe Photoshop. I would like the images to be resized, and keep the exif data after upload. When imageTransformOutputStripImageHead is set to false, the image appears pink after upload. In the image transform plugin, I can comment out this code, and the transform will not have the error:
// re-inject image head in case of JPEG, as the image head is removed by canvas export if (imageHead !== null) { blob = new Blob([imageHead, blob.slice(20)], { type: blob.type, }); }

In the imagetransform plugin - getImageHead() function, I guess the header info is sliced differently with the 8 bit image?

8 Bit Grayscale images exported from GIMP do not have this issue, only images from Adobe photoshop.

Any help is appreciated thanks.

Reproduction

Image

Image

I have attached an example image, if filepond is used with the transform plugin, with imageTransformOutputStripImageHead set to false, the error will happen.

I also attached an image showing the pink after transform.

Environment

- Device: HP Laptop
- OS: Windows 10
- Browser: Google Chrome

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions