Lines Matching refs:ofile
295 static ssize_t parse8BIM(Image *ifile, Image *ofile)
428 currentpos = TellBlob(ofile);
431 offset=SeekBlob(ofile,savedpos,SEEK_SET);
434 (void) WriteBlobMSBLong(ofile,(unsigned int) diff);
435 offset=SeekBlob(ofile,currentpos,SEEK_SET);
442 (void) WriteBlobByte(ofile,0x00);
445 (void) WriteBlobString(ofile,"8BIM");
446 (void) WriteBlobMSBShort(ofile,(unsigned short) recnum);
450 (void) WriteBlobByte(ofile,nlen);
453 (void) WriteBlobByte(ofile,(unsigned char) name[i]);
457 (void) WriteBlobByte(ofile,0x00);
462 (void) WriteBlobMSBLong(ofile, (unsigned int) len);
468 (void) WriteBlobByte(ofile,(unsigned char) token[next++]);
472 (void) WriteBlobByte(ofile,0x00);
479 savedpos = TellBlob(ofile);
482 (void) WriteBlobMSBLong(ofile,0xFFFFFFFFU);
491 (void) WriteBlobByte(ofile,0x1c);
492 (void) WriteBlobByte(ofile,(unsigned char) dataset);
493 (void) WriteBlobByte(ofile,(unsigned char) (recnum & 0xff));
494 (void) WriteBlobMSBShort(ofile,(unsigned short) len);
499 (void) WriteBlobByte(ofile,(unsigned char) token[next++]);
527 currentpos = TellBlob(ofile);
530 offset=SeekBlob(ofile,savedpos,SEEK_SET);
533 (void) WriteBlobMSBLong(ofile,(unsigned int) diff);
534 offset=SeekBlob(ofile,currentpos,SEEK_SET);
591 static ssize_t parse8BIMW(Image *ifile, Image *ofile)
724 currentpos = TellBlob(ofile);
727 offset=SeekBlob(ofile,savedpos,SEEK_SET);
730 (void) WriteBlobMSBLong(ofile,(unsigned int) diff);
731 offset=SeekBlob(ofile,currentpos,SEEK_SET);
738 (void) WriteBlobByte(ofile,0x00);
741 (void) WriteBlobString(ofile,"8BIM");
742 (void) WriteBlobMSBShort(ofile,(unsigned short) recnum);
746 (void) WriteBlobByte(ofile,(unsigned char) nlen);
749 (void) WriteBlobByte(ofile,(unsigned char) name[i]);
753 (void) WriteBlobByte(ofile,0x00);
758 (void) WriteBlobMSBLong(ofile,(unsigned int) len);
764 (void) WriteBlobByte(ofile,(unsigned char) token[next++]);
768 (void) WriteBlobByte(ofile,0x00);
775 savedpos = TellBlob(ofile);
778 (void) WriteBlobMSBLong(ofile,0xFFFFFFFFU);
787 (void) WriteBlobByte(ofile,0x1c);
788 (void) WriteBlobByte(ofile,dataset);
789 (void) WriteBlobByte(ofile,(unsigned char) (recnum & 0xff));
790 (void) WriteBlobMSBShort(ofile,(unsigned short) len);
795 (void) WriteBlobByte(ofile,(unsigned char) token[next++]);
823 currentpos = TellBlob(ofile);
826 offset=SeekBlob(ofile,savedpos,SEEK_SET);
829 (void) WriteBlobMSBLong(ofile,(unsigned int) diff);
830 offset=SeekBlob(ofile,currentpos,SEEK_SET);
872 static int jpeg_transfer_1(Image *ifile, Image *ofile)
879 (void) WriteBlobByte(ofile,(unsigned char) c);
895 static int jpeg_read_remaining(Image *ifile, Image *ofile)
899 while ((c = jpeg_transfer_1(ifile, ofile)) != EOF)
904 static int jpeg_skip_variable(Image *ifile, Image *ofile)
909 if ((c1 = jpeg_transfer_1(ifile, ofile)) == EOF)
911 if ((c2 = jpeg_transfer_1(ifile, ofile)) == EOF)
918 if (jpeg_transfer_1(ifile, ofile) == EOF)
924 static int jpeg_skip_variable2(Image *ifile, Image *ofile)
929 (void) ofile;
943 static int jpeg_nextmarker(Image *ifile, Image *ofile)
955 (void) WriteBlobByte(ofile,(unsigned char) c);
999 static int jpeg_embed(Image *ifile, Image *ofile, Image *iptc)
1006 if (jpeg_transfer_1(ifile, ofile) != 0xFF)
1008 if (jpeg_transfer_1(ifile, ofile) != M_SOI)
1013 marker=(unsigned int) jpeg_nextmarker(ifile, ofile);
1022 (void) WriteBlobByte(ofile,0xff);
1023 (void) WriteBlobByte(ofile,(unsigned char) marker);
1031 jpeg_skip_variable2(ifile, ofile);
1036 jpeg_skip_variable(ifile, ofile);
1049 (void) WriteBlobByte(ofile,(unsigned char) psheader[inx]);
1050 jpeg_read_remaining(iptc, ofile);
1053 (void) WriteBlobByte(ofile,0);
1059 jpeg_read_remaining(ifile, ofile);
1064 jpeg_skip_variable(ifile, ofile);
1073 static void jpeg_strip(Image *ifile, Image *ofile)
1080 (void) WriteBlobByte(ofile,0xff);
1081 (void) WriteBlobByte(ofile,M_SOI);
1082 jpeg_read_remaining(ifile, ofile);
1087 static int jpeg_extract(Image *ifile, Image *ofile)
1102 marker = jpeg_nextmarker(ifile, ofile);
1720 static void formatString(Image *ofile, const char *s, int len)
1725 (void) WriteBlobByte(ofile,'"');
1730 (void) WriteBlobString(ofile,"&");
1734 (void) WriteBlobString(ofile,"<");
1737 (void) WriteBlobString(ofile,">");
1741 (void) WriteBlobString(ofile,""");
1745 (void) WriteBlobByte(ofile,(unsigned char) *s);
1749 (void) WriteBlobString(ofile,temp);
1755 (void) WriteBlobString(ofile,"\"\r\n");
1758 (void) WriteBlobString(ofile,"\"\r");
1760 (void) WriteBlobString(ofile,"\"\n");
1831 static int formatIPTC(Image *ifile, Image *ofile)
1935 (void) WriteBlobString(ofile,temp);
1936 formatString( ofile, (char *)str, taglen );
1965 static int formatIPTCfromBuffer(Image *ofile, char *s, ssize_t len)
2068 (void) WriteBlobString(ofile,temp);
2069 formatString( ofile, (char *)str, taglen );
2077 static int format8BIM(Image *ifile, Image *ofile)
2193 (void) WriteBlobString(ofile,temp);
2196 formatString(ofile, "IPTC", 4);
2197 formatIPTCfromBuffer(ofile, (char *)str, (ssize_t) count);
2200 formatString(ofile, (char *)str, (ssize_t) count);