Copy/Pasting indexed-colors images into image editor

Bugs will be moved here once resolved.

Post » Tue Feb 02, 2016 3:17 am

Problem Description
This is a C2 image editor problem so I'm guessing you guys probably won't be able to fix it ): still, I wanted to make a bug report just in case..

What happens is that if you have an indexed-color image opened up in Photoshop or any other image-edition tool and try to copy/paste it onto C2's image editor, it won't work.

Here's a picture to illustrate:
http://i.imgur.com/Gy3KQvj.png

In the left I have the image opened up in photoshop. I went to Image -> Mode -> Indexed Color, then I tried to copy/paste it onto mspaint. As you can see, it works perfectly. Then I tried doing the same in C2's image editor and that is what happened. Of course, there are numerous workarounds like exporting the image to png first, pasting it onto mspaint and then copying/pasting it again to C2, etc. I really wish I could just copy/paste it directly into C2 though. ):

I really needed this to work so I could control the colors I'm using more easly when drawing in these other tools. Indexed-colors means that every color that I use is pre-estabilished in a color palete, so I wouldn't accidentally use similar colors by mistake and could have better control over my palete.

Steps to Reproduce Bug
  • Open Photoshop or any other image tool that lets you change the image mode to indexed color
  • Copy image in aplication
  • Paste it to C2's image editor

Observed Result
Image gets completely broken

Expected Result
Should work w

Operating System and Service Pack
Windows 10

Construct 2 Version ID
r221

Thanks.
B
121
S
41
G
40
Posts: 841
Reputation: 27,857

Post » Tue Feb 02, 2016 5:42 am

Seems to work fine in Gimp.
Could it possibly be a driver issue?
Image ImageImage
B
165
S
49
G
147
Posts: 8,048
Reputation: 96,588

Post » Tue Feb 02, 2016 1:52 pm

newt wrote:Seems to work fine in Gimp.
Could it possibly be a driver issue?


Downloading it right now to try it out. It might actually be a driver issue, I'm using one of those "nvidia optimum" laptops so maybe the nvidia card isn't available in C2? Gonna do a little testing, thanks for the input!

Edit: Just tested it with Gimp and it works.. really weird. My guess is that Gimp copies the image as you see it, without color indexation or something. GraphicsGale (one of the programs I'm using) actually has an option to copy the image as 32bpp, but this happens when pasting onto C2:

http://i.imgur.com/m5iq3BM.png

Also I've checked and let every program (C2, GraphicsGale, Photoshop) use the Nvidia card (thankfully they've came back with the option to do this!) but still same thing happens.

By the way, copying it from GraphicsGale as 32bpp and pasting it onto anywhere else works just fine.
B
121
S
41
G
40
Posts: 841
Reputation: 27,857

Post » Tue Feb 02, 2016 3:58 pm

Maybe it's just the internal state of Photoshop. Try saving it first, of course that negates the reason for pating in the first place.
If it has a drag and drop feature, you could try that.
Image ImageImage
B
165
S
49
G
147
Posts: 8,048
Reputation: 96,588

Post » Tue Feb 02, 2016 4:30 pm

newt wrote:Maybe it's just the internal state of Photoshop. Try saving it first, of course that negates the reason for pating in the first place.
If it has a drag and drop feature, you could try that.


It could be but I find it very weird that it works when pasting onto MSPaint and every other program but not in C2.

In any case I don't think the Scirra team has much control over the image editor (I think I might have read that before somewhere on the forums) so I'm not sure this would be fixable anyway...

Edit: After a lot of testing I couldn't get it to work so I decided to use C2's "external image editor" option to open my images in graphicsgale, then copy/paste it there. It takes a bit more of time, but that's all I could do..
B
121
S
41
G
40
Posts: 841
Reputation: 27,857

Post » Tue Feb 09, 2016 4:19 pm

The image editor primarily expects PNG. If it only has a DIBV5 bitmap, and it's less than or equal to 24 bits per pixel (which I assume indexed color is), it justs asks GDI+ to decode the bitmap, which is a Windows component. GDI+ is pretty crap so it wouldn't surprise me if it doesn't understand this. MSPaint has been dragged kicking and screaming from the Windows 3.1 days when this kind of image was more common, so I guess they have their own bitmap decoder. It's also possible to copy data to the clipboard in multiple formats, so if something like GIMP copies both PNG and bitmap, C2 will paste the PNG, which works. I guess Photoshop only copies an 8-bit indexed bitmap, which Windows itself doesn't understand :P

I don't see this being resolved, is arguably partly Photoshop's and Windows' fault, and it seems to have easy workarounds, so I think I'll just close this...
Scirra Founder
B
382
S
223
G
86
Posts: 23,997
Reputation: 189,761


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 0 guests