Lines Matching refs:out
45 static int gdBMPPutWord(gdIOCtx *out, int w) in gdBMPPutWord() argument
48 gdPutC(w & 0xFF, out); in gdBMPPutWord()
49 gdPutC((w >> 8) & 0xFF, out); in gdBMPPutWord()
53 static int gdBMPPutInt(gdIOCtx *out, int w) in gdBMPPutInt() argument
56 gdPutC(w & 0xFF, out); in gdBMPPutInt()
57 gdPutC((w >> 8) & 0xFF, out); in gdBMPPutInt()
58 gdPutC((w >> 16) & 0xFF, out); in gdBMPPutInt()
59 gdPutC((w >> 24) & 0xFF, out); in gdBMPPutInt()
69 gdIOCtx *out = gdNewDynamicCtx(2048, NULL); in gdImageBmpPtr() local
70 if (out == NULL) return NULL; in gdImageBmpPtr()
71 gdImageBmpCtx(im, out, compression); in gdImageBmpPtr()
72 rv = gdDPExtractData(out, size); in gdImageBmpPtr()
73 out->gd_free(out); in gdImageBmpPtr()
82 gdIOCtx *out = gdNewFileCtx(outFile); in gdImageBmp() local
83 if (out == NULL) return; in gdImageBmp()
84 gdImageBmpCtx(im, out, compression); in gdImageBmp()
85 out->gd_free(out); in gdImageBmp()
91 void gdImageBmpCtx(gdImagePtr im, gdIOCtxPtr out, int compression) in gdImageBmpCtx() argument
105 if (compression == 1 && !out->seek) { in gdImageBmpCtx()
110 out_original = out; in gdImageBmpCtx()
111 if ((out = (gdIOCtxPtr)gdNewFileCtx(tmpfile_for_compression)) == NULL) { in gdImageBmpCtx()
112 out = out_original; in gdImageBmpCtx()
136 gdPutBuf("BM", 2, out); in gdImageBmpCtx()
137 gdBMPPutInt(out, total_size); in gdImageBmpCtx()
138 gdBMPPutWord(out, 0); in gdImageBmpCtx()
139 gdBMPPutWord(out, 0); in gdImageBmpCtx()
140 gdBMPPutInt(out, 14 + info_size); in gdImageBmpCtx()
143 gdBMPPutInt(out, BMP_WINDOWS_V3); /* header size */ in gdImageBmpCtx()
144 gdBMPPutInt(out, im->sx); /* width */ in gdImageBmpCtx()
145 gdBMPPutInt(out, im->sy); /* height */ in gdImageBmpCtx()
146 gdBMPPutWord(out, 1); /* colour planes */ in gdImageBmpCtx()
147 gdBMPPutWord(out, (im->trueColor ? 24 : 8)); /* bit count */ in gdImageBmpCtx()
148 gdBMPPutInt(out, (compression ? BMP_BI_RLE8 : BMP_BI_RGB)); /* compression */ in gdImageBmpCtx()
149 gdBMPPutInt(out, bitmap_size); /* image size */ in gdImageBmpCtx()
150 gdBMPPutInt(out, 0); /* H resolution */ in gdImageBmpCtx()
151 gdBMPPutInt(out, 0); /* V ressolution */ in gdImageBmpCtx()
152 gdBMPPutInt(out, im->colorsTotal); /* colours used */ in gdImageBmpCtx()
153 gdBMPPutInt(out, 0); /* important colours */ in gdImageBmpCtx()
164 Putchar(gdImageBlue(im, i), out); in gdImageBmpCtx()
165 Putchar(gdImageGreen(im, i), out); in gdImageBmpCtx()
166 Putchar(gdImageRed(im, i), out); in gdImageBmpCtx()
167 Putchar(0, out); in gdImageBmpCtx()
188 Putchar(gdImageGetPixel(im, xpos, row), out); in gdImageBmpCtx()
195 Putchar('\0', out); in gdImageBmpCtx()
207 gdPutBuf(uncompressed_row, compressed_size, out); in gdImageBmpCtx()
208 Putchar(BMP_RLE_COMMAND, out); in gdImageBmpCtx()
209 Putchar(BMP_RLE_ENDOFLINE, out); in gdImageBmpCtx()
220 Putchar(BMP_RLE_COMMAND, out); in gdImageBmpCtx()
221 Putchar(BMP_RLE_ENDOFBITMAP, out); in gdImageBmpCtx()
225 gdSeek(out, 2); in gdImageBmpCtx()
226 gdBMPPutInt(out, total_size + bitmap_size); in gdImageBmpCtx()
229 gdSeek(out, 34); in gdImageBmpCtx()
230 gdBMPPutInt(out, bitmap_size); in gdImageBmpCtx()
238 Putchar(gdTrueColorGetBlue(pixel), out); in gdImageBmpCtx()
239 Putchar(gdTrueColorGetGreen(pixel), out); in gdImageBmpCtx()
240 Putchar(gdTrueColorGetRed(pixel), out); in gdImageBmpCtx()
245 Putchar('\0', out); in gdImageBmpCtx()
256 gdSeek(out, 0); in gdImageBmpCtx()
262 while ((buffer_size = gdGetBuf(copy_buffer, 1024, out)) != EOF) { in gdImageBmpCtx()
271 out->gd_free(out); in gdImageBmpCtx()
272 out = out_original; in gdImageBmpCtx()