Palette bug when importing hero sprites

Ask and answer questions about making games and related topics. Unrelated topics go in that other forum.

Moderators: marionline, SDHawk

Post Reply
User avatar
Hedera
Slime Knight
Posts: 175
Joined: Tue May 17, 2011 11:38 am
Location: a dying forest (all forests are dying)

Palette bug when importing hero sprites

Post by Hedera »

So, something's been happening in the Gorgonzola release whenever I import hero spritesets, and I don't know what's causing it. Essentially, the palette changes so that the last color in the index turns black.

I've tried it again with a dummy spriteset consisting only of colors 1 (transparent) and 16, and upon importing, it appears completely invisible in the preview when choosing to overwrite the palette (it appears again if importing without palette). Is this happening to anyone else?

edit: is there a way to make the image appear within the message, rather than at the top?
Attachments
As you can see, color 16 is black when it shouldn't be.
As you can see, color 16 is black when it shouldn't be.
ODWMYLTF0000.png (4.12 KiB) Viewed 1514 times
Last edited by Hedera on Thu May 07, 2020 8:13 am, edited 2 times in total.
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

Thanks for the report. However I can't reproduce this, but if it is some kind of memory error, having varying and unreliable symptoms would be typical.

Is the image you're importing a .png or .bmp file? What bitdepth is it? (It tells you in the OHR's file browser)
Does it happen with all spritesets you try to import?
Does the colour reappear after you import the spriteset (with palette)?
edit: is there a way to make the image appear within the message, rather than at the top?
For me, when the web browser window is less than 888 pixels wide (at 100% scale) it goes into mobile mode, which causes attached images to appear at the top instead of floating to the right. But 887px is still more than enough rom for floats, so that's unfortunate.
There's no way to make attached images appear differently, unless you upload them somewhere else and then embed the URL in your post. (In fact you can send yourself a PM with the image attached in order to host the file on SS, then link to it. But beware that there's a size limit on PM attachments)
Last edited by TMC on Thu May 07, 2020 4:01 pm, edited 1 time in total.
User avatar
Hedera
Slime Knight
Posts: 175
Joined: Tue May 17, 2011 11:38 am
Location: a dying forest (all forests are dying)

Post by Hedera »

They're .png files, 4-bit color depth, it happens with all sprite sets I try to import, it happens both when importing entire sets and when importing individual frames, and no, the color doesn't appear after importing with the palette (I can manually change the last color in the palette to what it's supposed to be and the image comes out correctly, though?)

I tried it again after choosing magenta instead of black as the first color in the palette, and it still reads the last color as black.

Also, in the OP, there's supposed to be a screenshot of it happening, but it only appears when I'm logged in; when logged out, it vanishes. Is it visible to anyone else?
User avatar
Bird
Slime Knight
Posts: 227
Joined: Thu Jan 26, 2012 2:19 pm
Location: Germany

Post by Bird »

Hedera Helix wrote:Also, in the OP, there's supposed to be a screenshot of it happening, but it only appears when I'm logged in; when logged out, it vanishes. Is it visible to anyone else?
Strange, screenshots normally appear also for visitors, but this one doesn't.

The bug is true, by the way! I reproduced it with a PNG file, too. The same file as BMP did import properly.
Attachments
Last palette colour while importing the PNG is black
Last palette colour while importing the PNG is black
palbug.png (3.64 KiB) Viewed 1470 times
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

Ah yes, I was testing bmps; I can reproduce that
Well that's good, it localises the bug to a very small area. Will try fix it tomorrow.

You're right, image attachments aren't visible if you're logged out. They do show in the Games and Reviews forums though. I never noticed before. I asked Mogri if it's intentional.
Last edited by TMC on Fri May 08, 2020 3:15 pm, edited 1 time in total.
User avatar
Mogri
Super Slime
Posts: 4668
Joined: Mon Oct 15, 2007 6:38 pm
Location: Austin, TX
Contact:

Post by Mogri »

No, unauthenticated users should see attachments, too. It's fixed here; let me know if it's happening elsewhere.
User avatar
Pepsi Ranger
Liquid Metal Slime
Posts: 1457
Joined: Thu Nov 22, 2007 6:25 am
Location: South Florida

Post by Pepsi Ranger »

TMC wrote:You're right, image attachments aren't visible if you're logged out. They do show in the Games and Reviews forums though. I never noticed before. I asked Mogri if it's intentional.
I've seen this image display bug often (when logged in), and I've mentioned it several times, including most recently in this post.
Mogri wrote:No, unauthenticated users should see attachments, too. It's fixed here; let me know if it's happening elsewhere.


Hopefully that fixes it. The randomness of its functionality is the reason I remote link graphics from my blog instead posting natively here. I'm tired of it asking me to download an image I should already see in the post.

I do wonder, though, if the size of the image has anything to do with its immediate display versus the download-to-view requirement.
Place Obligatory Signature Here
User avatar
Mogri
Super Slime
Posts: 4668
Joined: Mon Oct 15, 2007 6:38 pm
Location: Austin, TX
Contact:

Post by Mogri »

Pepsi Ranger wrote:Hopefully that fixes it. The randomness of its functionality is the reason I remote link graphics from my blog instead posting natively here. I'm tired of it asking me to download an image I should already see in the post.

I do wonder, though, if the size of the image has anything to do with its immediate display versus the download-to-view requirement.
I'm pretty sure that's something else entirely. No idea why some of them don't display inline.
Post Reply