// Repeat the pixel length times.
if ( !stream.Read(buf, pixelSize) )
return wxTGA_IOERR;
// Repeat the pixel length times.
if ( !stream.Read(buf, pixelSize) )
return wxTGA_IOERR;
// Write the next length pixels directly to the image data.
if ( !stream.Read(imageData, length) )
return wxTGA_IOERR;
// Write the next length pixels directly to the image data.
if ( !stream.Read(imageData, length) )
return wxTGA_IOERR;
unsigned char hdr[HDR_SIZE];
stream.Read(hdr, HDR_SIZE); // it's ok to modify the stream position here
unsigned char hdr[HDR_SIZE];
stream.Read(hdr, HDR_SIZE); // it's ok to modify the stream position here
short colorType = hdr[HDR_COLORTYPE];
if ( colorType != wxTGA_UNMAPPED && colorType != wxTGA_MAPPED )
short colorType = hdr[HDR_COLORTYPE];
if ( colorType != wxTGA_UNMAPPED && colorType != wxTGA_MAPPED )