Lines Matching refs:msheader

332 		MSInfoHeader msheader;  in identify_bmp_header()  local
333 msheader.size = headersize; in identify_bmp_header()
335 reinterpret_cast<uint8 *> (&msheader) + 4, 36) != 36) in identify_bmp_header()
340 reinterpret_cast<uint8 *> (&msheader) + 4, 36, in identify_bmp_header()
345 if (msheader.width == 0 || msheader.height == 0) in identify_bmp_header()
347 if (msheader.planes != 1) in identify_bmp_header()
349 if ((msheader.bitsperpixel != 1 || in identify_bmp_header()
350 msheader.compression != BMP_NO_COMPRESS) && in identify_bmp_header()
351 (msheader.bitsperpixel != 4 || in identify_bmp_header()
352 msheader.compression != BMP_NO_COMPRESS) && in identify_bmp_header()
353 (msheader.bitsperpixel != 4 || in identify_bmp_header()
354 msheader.compression != BMP_RLE4_COMPRESS) && in identify_bmp_header()
355 (msheader.bitsperpixel != 8 || in identify_bmp_header()
356 msheader.compression != BMP_NO_COMPRESS) && in identify_bmp_header()
357 (msheader.bitsperpixel != 8 || in identify_bmp_header()
358 msheader.compression != BMP_RLE8_COMPRESS) && in identify_bmp_header()
359 (msheader.bitsperpixel != 24 || in identify_bmp_header()
360 msheader.compression != BMP_NO_COMPRESS) && in identify_bmp_header()
361 (msheader.bitsperpixel != 32 || in identify_bmp_header()
362 msheader.compression != BMP_NO_COMPRESS)) in identify_bmp_header()
364 if (!msheader.imagesize && msheader.compression) in identify_bmp_header()
366 if (msheader.colorsimportant > msheader.colorsused) in identify_bmp_header()
377 msheader.bitsperpixel); in identify_bmp_header()
378 if (msheader.compression) in identify_bmp_header()
392 pmsheader->size = msheader.size; in identify_bmp_header()
393 pmsheader->width = abs(msheader.width); in identify_bmp_header()
394 pmsheader->height = msheader.height; in identify_bmp_header()
395 pmsheader->planes = msheader.planes; in identify_bmp_header()
396 pmsheader->bitsperpixel = msheader.bitsperpixel; in identify_bmp_header()
397 pmsheader->compression = msheader.compression; in identify_bmp_header()
398 pmsheader->imagesize = msheader.imagesize; in identify_bmp_header()
399 pmsheader->xpixperm = msheader.xpixperm; in identify_bmp_header()
400 pmsheader->ypixperm = msheader.ypixperm; in identify_bmp_header()
401 pmsheader->colorsused = msheader.colorsused; in identify_bmp_header()
402 pmsheader->colorsimportant = msheader.colorsimportant; in identify_bmp_header()
584 BPositionIO *outDestination, color_space fromspace, MSInfoHeader &msheader) in translate_from_bits_to_bmp24() argument
624 int32 bitsRowBytes = msheader.width * bitsBytesPerPixel; in translate_from_bits_to_bmp24()
625 int32 padding = get_padding(msheader.width, msheader.bitsperpixel); in translate_from_bits_to_bmp24()
627 get_rowbytes(msheader.width, msheader.bitsperpixel); in translate_from_bits_to_bmp24()
629 if (msheader.height > 0) in translate_from_bits_to_bmp24()
630 inSource->Seek((msheader.height - 1) * bitsRowBytes, SEEK_CUR); in translate_from_bits_to_bmp24()
651 for (int32 i = 0; i < msheader.width; i++) { in translate_from_bits_to_bmp24()
769 if (bmppixrow == abs(msheader.height)) in translate_from_bits_to_bmp24()
772 if (msheader.height > 0) in translate_from_bits_to_bmp24()
809 BPositionIO *outDestination, int32 bitsRowBytes, MSInfoHeader &msheader) in translate_from_bits8_to_bmp8() argument
811 int32 padding = get_padding(msheader.width, msheader.bitsperpixel); in translate_from_bits8_to_bmp8()
813 get_rowbytes(msheader.width, msheader.bitsperpixel); in translate_from_bits8_to_bmp8()
815 if (msheader.height > 0) in translate_from_bits8_to_bmp8()
816 inSource->Seek((msheader.height - 1) * bitsRowBytes, SEEK_CUR); in translate_from_bits8_to_bmp8()
828 memcpy(bmpRowData, bitsRowData, msheader.width); in translate_from_bits8_to_bmp8()
834 if (bmppixrow == abs(msheader.height)) in translate_from_bits8_to_bmp8()
837 if (msheader.height > 0) in translate_from_bits8_to_bmp8()
874 BPositionIO *outDestination, int32 bitsRowBytes, MSInfoHeader &msheader) in translate_from_bits1_to_bmp1() argument
876 uint8 pixelsPerByte = 8 / msheader.bitsperpixel; in translate_from_bits1_to_bmp1()
878 get_rowbytes(msheader.width, msheader.bitsperpixel); in translate_from_bits1_to_bmp1()
880 if (msheader.height > 0) in translate_from_bits1_to_bmp1()
881 inSource->Seek((msheader.height - 1) * bitsRowBytes, SEEK_CUR); in translate_from_bits1_to_bmp1()
894 for (int32 i = 0; (bmppixcol < msheader.width) && in translate_from_bits1_to_bmp1()
898 for (uint8 compbit = 128; (bmppixcol < msheader.width) && in translate_from_bits1_to_bmp1()
920 if (bmppixrow == abs(msheader.height)) in translate_from_bits1_to_bmp1()
923 if (msheader.height > 0) in translate_from_bits1_to_bmp1()
956 MSInfoHeader &msheader) in write_bmp_headers() argument
963 memcpy(bmpheaders + 14, &msheader, sizeof(msheader)); in write_bmp_headers()
1023 MSInfoHeader msheader; in translate_from_bits() local
1024 msheader.size = 40; in translate_from_bits()
1025 msheader.width = in translate_from_bits()
1027 msheader.height = in translate_from_bits()
1029 msheader.planes = 1; in translate_from_bits()
1030 msheader.xpixperm = 2835; // 72 dpi horizontal in translate_from_bits()
1031 msheader.ypixperm = 2835; // 72 dpi vertical in translate_from_bits()
1032 msheader.colorsused = 0; in translate_from_bits()
1033 msheader.colorsimportant = 0; in translate_from_bits()
1055 msheader.bitsperpixel = 24; in translate_from_bits()
1056 msheader.compression = BMP_NO_COMPRESS; in translate_from_bits()
1057 msheader.imagesize = get_rowbytes(msheader.width, 24) * in translate_from_bits()
1058 msheader.height; in translate_from_bits()
1060 msheader.imagesize; in translate_from_bits()
1067 msheader.colorsused = 256; in translate_from_bits()
1068 msheader.colorsimportant = 256; in translate_from_bits()
1070 msheader.bitsperpixel = 8; in translate_from_bits()
1071 msheader.compression = BMP_NO_COMPRESS; in translate_from_bits()
1072 msheader.imagesize = get_rowbytes(msheader.width, in translate_from_bits()
1073 msheader.bitsperpixel) * msheader.height; in translate_from_bits()
1075 msheader.imagesize; in translate_from_bits()
1081 msheader.colorsused = 2; in translate_from_bits()
1082 msheader.colorsimportant = 2; in translate_from_bits()
1084 msheader.bitsperpixel = 1; in translate_from_bits()
1085 msheader.compression = BMP_NO_COMPRESS; in translate_from_bits()
1086 msheader.imagesize = get_rowbytes(msheader.width, in translate_from_bits()
1087 msheader.bitsperpixel) * msheader.height; in translate_from_bits()
1089 msheader.imagesize; in translate_from_bits()
1099 result = write_bmp_headers(outDestination, fileHeader, msheader); in translate_from_bits()
1127 bitsHeader.colors, msheader); in translate_from_bits()
1165 bitsHeader.rowBytes, msheader); in translate_from_bits()
1179 bitsHeader.rowBytes, msheader); in translate_from_bits()
1211 BPositionIO *outDestination, MSInfoHeader &msheader) in translate_from_bmpnpal_to_bits() argument
1213 int32 bitsRowBytes = msheader.width * 4; in translate_from_bmpnpal_to_bits()
1214 int32 bmpBytesPerPixel = msheader.bitsperpixel / 8; in translate_from_bmpnpal_to_bits()
1216 get_rowbytes(msheader.width, msheader.bitsperpixel); in translate_from_bmpnpal_to_bits()
1221 off_t bitsFileSize = (bitsRowBytes * abs(msheader.height)) + in translate_from_bmpnpal_to_bits()
1230 if (msheader.height > 0) in translate_from_bmpnpal_to_bits()
1231 outDestination->Seek((msheader.height - 1) * bitsRowBytes, SEEK_CUR); in translate_from_bmpnpal_to_bits()
1252 uint32 rowCount = abs(msheader.height); in translate_from_bmpnpal_to_bits()
1269 for (int32 i = 0; i < msheader.width; i++) { in translate_from_bmpnpal_to_bits()
1279 if (msheader.height > 0) in translate_from_bmpnpal_to_bits()
1325 BPositionIO *outDestination, MSInfoHeader &msheader, in translate_from_bmppal_to_bits() argument
1328 uint16 pixelsPerByte = 8 / msheader.bitsperpixel; in translate_from_bmppal_to_bits()
1329 uint16 bitsPerPixel = msheader.bitsperpixel; in translate_from_bmppal_to_bits()
1340 get_rowbytes(msheader.width, msheader.bitsperpixel); in translate_from_bmppal_to_bits()
1346 int32 bitsRowBytes = msheader.width * 4; in translate_from_bmppal_to_bits()
1347 off_t bitsFileSize = (bitsRowBytes * abs(msheader.height)) + in translate_from_bmppal_to_bits()
1353 if (msheader.height > 0) in translate_from_bmppal_to_bits()
1354 outDestination->Seek((msheader.height - 1) * bitsRowBytes, SEEK_CUR); in translate_from_bmppal_to_bits()
1368 for (int32 i = 0; i < msheader.width; i++) { in translate_from_bmppal_to_bits()
1383 if (bmppixrow == abs(msheader.height)) in translate_from_bmppal_to_bits()
1386 if (msheader.height > 0) in translate_from_bmppal_to_bits()
1454 BPositionIO *outDestination, int32 datasize, MSInfoHeader &msheader, in translate_from_bmppalr_to_bits() argument
1457 uint16 pixelsPerByte = 8 / msheader.bitsperpixel; in translate_from_bmppalr_to_bits()
1458 uint16 bitsPerPixel = msheader.bitsperpixel; in translate_from_bmppalr_to_bits()
1465 int32 rowCount = abs(msheader.height); in translate_from_bmppalr_to_bits()
1466 int32 bitsRowBytes = msheader.width * 4; in translate_from_bmppalr_to_bits()
1479 off_t rowOffset = msheader.height > 0 ? bitsRowBytes * -2 : 0; in translate_from_bmppalr_to_bits()
1481 if (msheader.height > 0) in translate_from_bmppalr_to_bits()
1482 outDestination->Seek((msheader.height - 1) * bitsRowBytes, SEEK_CUR); in translate_from_bmppalr_to_bits()
1489 if (bmppixcol == msheader.width) { in translate_from_bmppalr_to_bits()
1497 if (count + bmppixcol > msheader.width) in translate_from_bmppalr_to_bits()
1498 count = msheader.width - bmppixcol; in translate_from_bmppalr_to_bits()
1524 if (bmppixcol < msheader.width) in translate_from_bmppalr_to_bits()
1526 defaultcolor, msheader.width - bmppixcol); in translate_from_bmppalr_to_bits()
1537 if (bmppixcol == msheader.width) { in translate_from_bmppalr_to_bits()
1547 msheader.width - bmppixcol); in translate_from_bmppalr_to_bits()
1572 if ((dx + bmppixcol >= msheader.width) || in translate_from_bmppalr_to_bits()
1584 msheader.width - bmppixcol); in translate_from_bmppalr_to_bits()
1606 if (bmppixcol == msheader.width) { in translate_from_bmppalr_to_bits()
1614 if (code + bmppixcol > msheader.width) in translate_from_bmppalr_to_bits()
1615 code = msheader.width - bmppixcol; in translate_from_bmppalr_to_bits()
1688 MSInfoHeader msheader; in translate_from_bmp() local
1693 result = identify_bmp_header(inSource, NULL, &fileHeader, &msheader, in translate_from_bmp()
1704 result = write_bmp_headers(outDestination, fileHeader, msheader); in translate_from_bmp()
1716 if (!frommsformat && (msheader.bitsperpixel == 1 || in translate_from_bmp()
1717 msheader.bitsperpixel == 4 || msheader.bitsperpixel == 8)) { in translate_from_bmp()
1719 uint16 ncolors = 1 << msheader.bitsperpixel; in translate_from_bmp()
1754 bitsHeader.bounds.right = msheader.width - 1; in translate_from_bmp()
1755 bitsHeader.bounds.bottom = abs(msheader.height) - 1; in translate_from_bmp()
1760 if (msheader.bitsperpixel == 1 || in translate_from_bmp()
1761 msheader.bitsperpixel == 4 || in translate_from_bmp()
1762 msheader.bitsperpixel == 8) { in translate_from_bmp()
1770 if (!msheader.colorsused) in translate_from_bmp()
1771 msheader.colorsused = 1 << msheader.bitsperpixel; in translate_from_bmp()
1773 if (inSource->Read(bmppalette, msheader.colorsused * in translate_from_bmp()
1775 (off_t) msheader.colorsused * palBytesPerPixel) in translate_from_bmp()
1780 if (fileHeader.dataOffset > (msheader.colorsused * in translate_from_bmp()
1783 ((msheader.colorsused * palBytesPerPixel) + 54); in translate_from_bmp()
1793 bitsHeader.rowBytes = msheader.width * 4; in translate_from_bmp()
1795 int32 datasize = bitsHeader.rowBytes * abs(msheader.height); in translate_from_bmp()
1811 switch (msheader.bitsperpixel) { in translate_from_bmp()
1815 outDestination, msheader); in translate_from_bmp()
1819 if (msheader.compression == BMP_NO_COMPRESS) in translate_from_bmp()
1821 outDestination, msheader, bmppalette, frommsformat); in translate_from_bmp()
1824 else if (msheader.compression == BMP_RLE8_COMPRESS) in translate_from_bmp()
1826 outDestination, datasize, msheader, bmppalette); in translate_from_bmp()
1832 if (!msheader.compression) in translate_from_bmp()
1834 outDestination, msheader, bmppalette, frommsformat); in translate_from_bmp()
1837 else if (msheader.compression == BMP_RLE4_COMPRESS) in translate_from_bmp()
1839 outDestination, datasize, msheader, bmppalette); in translate_from_bmp()
1845 outDestination, msheader, bmppalette, frommsformat); in translate_from_bmp()