Code:
/* Object returned by pfLoad(): */
struct PNGFObject {
struct MinNode reserved; /* Reserved, eventually for a list node */
ULONG pfo_Width; /* You may find the width of the loaded
PNG image here. */
ULONG pfo_Height; /* You may find the height of the lo.aded
PNG image here. */
APTR pfo_DrawBuffer; /* PRIVATE */
UWORD pfo_DrawBufferModulo; /* PRIVATE (actually width * 3) */
ULONG pfo_ARGBModulo; /* PRIVATE (actually width * 4) */
APTR pfo_ARGBData; /* PRIVATE. For compatibility always use
pfGetAttr() to read out this field. */
UBYTE pfo_EndHead; /* End of the head, NOT of the Object!
Object size may vary:
DrawBuffer and ARGBData follow here,
so that alltogether can be freed with
one call to FreeVec(). */
};
Is pfo_EndHead really an UBYTE? In my .i it is a LABEL.
Further, I removed all the funny fields from the object structure. Now it looks like this:
Code:
/* Object returned by pfLoad(): */
struct PNGFObject {
struct MinNode reserved; /* Reserved, eventually for a list node */
ULONG pfo_Width; /* You may find the width of the loaded
PNG image here. */
ULONG pfo_Height; /* You may find the height of the lo.aded
PNG image here. */
APTR pfo_ARGBData; /* PRIVATE. For compatibility always use
pfGetAttr() to read out this field. */
UBYTE pfo_EndHead; /* End of the head, NOT of the Object!
Object size may vary:
DrawBuffer and ARGBData follow here,
so that alltogether can be freed with
one call to FreeVec(). */
};
I think this is the only place where to change that. So I did it.
PS: Is it possible to make the PRIVATE fields really private an not appear in the public struct?