XFX3d opened this issue on Nov 13, 2005 ยท 83 posts
kawecki posted Thu, 17 November 2005 at 8:40 AM
I don't know, according to the fromat of PICT2 there are missing 78 bytes and the information of 24 or 32 bits is important because will define if the thumb has or not alpha information.
PICT Header from my program:
// Write header
WriteBlobShort(&bptr,0); // 0x2D82 size
WriteBlobShort(&bptr,0); // size_rectangle.top
WriteBlobShort(&bptr,0); // size_rectangle.left
WriteBlobShort(&bptr,height); // size_rectangle.bottom
WriteBlobShort(&bptr,width); // size_rectangle.right
WriteBlobShort(&bptr,PictVersion); // 0x0011
WriteBlobShort(&bptr,0x02FF); // version #2
WriteBlobShort(&bptr,PictInfoOp); // 0x0C00
WriteBlobLong (&bptr,0xFFFFFFFFL); // 0xFFFE0000L); // FFFE0000
WriteBlobShort(&bptr,0x0000); //0x0048); // x_resolution ??
WriteBlobShort(&bptr,0x0000); // 0000
WriteBlobShort(&bptr,0x0000); //0x0048); // y_resolution ??
WriteBlobShort(&bptr,0x0000); // 0000
WriteBlobShort(&bptr,height); // frame_rectangle.top ??
WriteBlobShort(&bptr,0x0000); // frame_rectangle.left ??
WriteBlobShort(&bptr,width); // frame_rectangle.bottom ??
WriteBlobShort(&bptr,0x000); // frame_rectangle.right ??
WriteBlobLong (&bptr,0x00000000L); // 00000000
WriteBlobShort(&bptr,0x0001); // PictCropRegionOp
WriteBlobShort(&bptr,0x000A); // 000A
WriteBlobShort(&bptr,0x0000); // crop_rectangle.top
WriteBlobShort(&bptr,0x0000); // crop_rectangle.left
WriteBlobShort(&bptr,height); // crop_rectangle.bottom
WriteBlobShort(&bptr,width); // crop_rectangle.right
WriteBlobShort(&bptr,PictPixmapOp); // 0x009A
WriteBlobLong (&bptr,0x000000FFL); // base_address
WriteBlobShort(&bptr,row_bytes | 0x8000); // 816C (91x4) (91x3)
WriteBlobShort(&bptr,0x0000); // bounds.top
WriteBlobShort(&bptr,0x0000); // bounds.left
WriteBlobShort(&bptr,height); // bounds.bottom
WriteBlobShort(&bptr,width); // bounds.right
WriteBlobShort(&bptr,0x0000); // pixmap.version
WriteBlobShort(&bptr,0x0004); // pixmap.pack_type
WriteBlobLong (&bptr,0x00000000L); // pixmap.pack_size
WriteBlobShort(&bptr,0x0048); // x_resolution
WriteBlobShort(&bptr,0x0000); // 0000
WriteBlobShort(&bptr,0x0048); // y_resolution
WriteBlobShort(&bptr,0x0000); // 0000
WriteBlobShort(&bptr,0x0010); // pixmap.pixel_type (16)
WriteBlobShort(&bptr,bits_per_pixel); // 0x0020
WriteBlobShort(&bptr,component_count); // pixmap.component_count
WriteBlobShort(&bptr,0x0008); // pixmap.component_size
WriteBlobLong (&bptr,0x00000000L); // pixmap.plane_bytes
WriteBlobLong (&bptr,0x00000000L); // pixmap.table
WriteBlobLong (&bptr,0x00000000L); // pixmap.reserved
WriteBlobShort(&bptr,0x0000); // source_rectangle.top
WriteBlobShort(&bptr,0x0000); // source_rectangle.left
WriteBlobShort(&bptr,height); // source_rectangle.bottom
WriteBlobShort(&bptr,width); // source_rectangle.right
WriteBlobShort(&bptr,0x0000); // destination_rectangle.top
WriteBlobShort(&bptr,0x0000); // destination_rectangle.left
WriteBlobShort(&bptr,height); // destination_rectangle.bottom
WriteBlobShort(&bptr,width); // destination_rectangle.right
WriteBlobShort(&bptr,0x0000); // transfer_mode // 0008 ????
Stupidity also evolves!