playdate-reverse-engineering icon indicating copy to clipboard operation
playdate-reverse-engineering copied to clipboard

Document non-obvious clip/no-alpha interaction

Open AlanDeSmet opened this issue 2 years ago • 1 comments

Having spent too long debugging this, I think the pdi/pdt documentation should add some notes on interpreting the cell header. Here's my immediate thoughts (feel free to use them if you think they're useful):

When compiling images, the Playdate software tries to eliminate borders that are entirely transparent. How many rows or columns were removed are the clip values. If the clipped image has no remaining transparent pixels, no alpha channel will be written at all.

As a result, an image with transparent pixels may not have an alpha channel. The pixels for which there is data are opaque. When the clipped borders are re-added, they are always transparent.

AlanDeSmet avatar Jul 11 '22 02:07 AlanDeSmet

Ah, yeah, probably a good shout. I'll think about the wording a bit, maybe it could be clearer with an illustration too

jaames avatar Jul 11 '22 19:07 jaames

Updated the .pdi documentation to make this more obvious - thanks!

jaames avatar Mar 12 '23 19:03 jaames