Copy/Pasting indexed-colors images into image editor

0 favourites
  • 6 posts
From the Asset Store
Elevate your games with our AI Chatbot Integration! Seamlessly connect your Construct 3 projects with GPT-4 for dynamic,
  • 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.

  • Seems to work fine in Gimp.

    Could it possibly be a driver issue?

  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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..

  • 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

    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...

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)