Hello,
I having a strange issue with NewDTObject and the DTA_Handle tag item. When I do so, I get a #80000008 Guru when I do so.
I would like to read a JPEG image within a file, but its not at the beginning.
I am 100% certain where it seeks to is a valid JPEG header, and the BPTR is correct and seeked to the correct position.
I have checked this file and location with a hex editor. I have also extracted the JPEG file via a hex editor and it loads fine. Loading another similar JPEG file via the name as a path works fine as well.
This is my code (simplified):
Code:
BPTR file = Open("some-file", MODE_OLDFILE);
Seek(file, offset, OFFSET_BEGINNING);
Object* dtObj = NewDTObject(
NULL,
DTA_SourceType, DTST_FILE,
DTA_GroupID, GID_PICTURE,
PDTA_Remap, TRUE,
PDTA_Screen, (ULONG) mScreen,
PDTA_DestMode, PMODE_V43,
DTA_Handle, (ULONG) file, // << -------- This here.
TAG_DONE
);
I know, there is a way to load in files through memory, but I don't want the Amiga to temporarily allocate 80kb each time I wish to load an image.
I am on AmigaOS 3.2.1, with the default JPEG data type.
If anyone can shed a light on this, It would be most appreciative.
Thankyou,
betajaen