Feature #1867

Extract patch/sprite offsets from PNG 'grAb' chunk (ZDoom)

Added by vermil almost 10 years ago. Updated over 4 years ago.

Target version:
Start date:
% Done:




It seems that Dday is offsetting in wad PNG sprites incorrectly.

All world sprites seem to be offset south east relative to where they should be and hud sprites are offset north west.

Both types appear to be consistently offset incorrectly by the same amount.


#1 Updated by vermil almost 10 years ago

To throw a little more information into this report; the sprite clipper looks like it's clipping the incorrectly offset PNG sprites (i.e whether they are rendered or not) as if they aren't incorrectly offset.

Also it seems like all PNG sprites in Dday have a border of pixels around them (likely the colour used for transparency on the images) unless they are full bright. If they aren't full bright, only the top/bottom most row of pixels on the PNG sprite doesn't have said border.

#2 Updated by danij almost 10 years ago

  • Tracker changed from Bug to Feature

#3 Updated by danij almost 10 years ago

  • Tags set to Mod, Resources, ZDoom
  • Subject changed from PNG sprite offsets incorrect to Extract patch/sprite offsets from PNG 'grAb' chunk (ZDoom)

#4 Updated by danij almost 10 years ago

  • Category set to Enhancement

#5 Updated by danij almost 10 years ago

The reason the patches and sprites are offset incorrectly when read from in-wad PNG images is because the offset information is not presently extracted from the custom 'grAb' data chunk (which I believe originates from ZDoom).

A quick look at the Qt QImage docs suggests there is no API for reading custom data chunks from PNGs. So to offset the patches and sprites correctly we'd need to implement a special case handler to extract this data from the PNG.

#6 Updated by skyjake over 4 years ago

  • Target version set to Modding

Also available in: Atom PDF