Opened 7 years ago

Last modified 7 years ago

#16969 new Bug

[UploadImage] Transparency is lost if PNG is copied directly from webpage

Reported by: Wizard Owned by:
Priority: Normal Milestone:
Component: General Version: 4.6.2
Keywords: Cc: porjo


Steps to reproduce

  1. Use Firefox and go to
  2. Right-click the image and select Copy Image.
  3. Paste it in CKEditor with Upload Image plugin enabled and configured.

Expected result

PNG image should be displayed with transparent background.

Actual result

PNG image is displayed with black background. If however I save the image from webpage and copy it within Windows Explorer, it is pasted correctly in CKEditor.

Other details (browser, OS, CKEditor version, installed plugins)

Firefox 32bit v52.0.2, Windows 7 SP1 64bit, CKEditor 4.6.2 Full Package with Iframe Dialog Field and Upload Image plugins

I have attached 2 files. Alpha_yes.png is the image saved from Firefox (it has an alpha value) and alpha_no.png is the image that is copied directly from webpage (no alpha value).

Attachments (2)

alpha_yes.png (175.4 KB) - added by Wizard 7 years ago.
PNG with alpha value
alpha_no.png (143.0 KB) - added by Wizard 7 years ago.
PNG with no alpha value

Download all attachments as: .zip

Change History (5)

Changed 7 years ago by Wizard

Attachment: alpha_yes.png added

PNG with alpha value

Changed 7 years ago by Wizard

Attachment: alpha_no.png added

PNG with no alpha value

comment:1 Changed 7 years ago by porjo

I can't reproduce this issue - alpha is preserved for me. I'm using Firefox 52.0.2 on Linux and latest ckeditor + imageupload addon.

I think is very unlikely to be an issue with ckeditor or the addon. More likely to be Firefox, Windows or a combination of both.

If you copy and paste via clipboard to another application e.g. image editor, is the alpha preserved? Also, try another browser e.g. Chrome.

comment:2 Changed 7 years ago by porjo

Cc: porjo added

comment:3 Changed 7 years ago by Wizard

You are right. Copying and pasting to other applications doesn't preserve alpha also! Chrome has the same problem, too! So, it probably has something to do with Windows clipboard, if I find a Linux box, I'll test it. What confused me in the first place was MS Word, because it most likely downloads the image instead of pasting just the clipboard data. Is there a way I could do this directly with the UploadImage plugin?

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy