<!-- manual page source format generated by PolyglotMan v3.2, --> <!-- available at http://polyglotman.sourceforge.net/ --> <html> <head> <title>IM_CSV(3) manual page</title> </head> <body bgcolor='white'> <a href='#toc'>Table of Contents</a><p> <h2><a name='sect0' href='#toc0'>Name</a></h2> im_csv2vips, im_vips2csv - read and write CSV (comma separated values) files <h2><a name='sect1' href='#toc1'>Synopsis</a></h2> #include <vips/vips.h> <p> int im_csv2vips( const char *filename, IMAGE *out ) <p> int im_vips2csv( IMAGE *in, const char *filename ) <p> <h2><a name='sect2' href='#toc2'>Description</a></h2> <a href='im_csv2vips.3.html'><b>im_csv2vips(3)</a> </b> reads the CSV (comma separated values) data in filename, and writes the image out in VIPS format. The output image is always 1 band (monochrome), IM_BANDFMT_DOUBLE. <p> The reader is deliberately rather fussy: it will fail if there are any short lines, or if the file is too short. It will ignore lines that are too long. <p> Read options can be embedded in the filename. The options can be given in any order and are: <p> skip:lines-to-skip<br> <p> The number of lines to skip at the start of the file. Default zero. <p> whi:whitespace-characters<br> <p> The skippable whitespace characters. Default <space> and double quotes ("). Whitespace characters are always run together. <p> sep:separator-characters<br> <p> The characters that separate fields. Default ;,<tab>. Separators are never run together. <p> line:lines-to-read<br> <p> The number of lines to read from the file. Default -1, meaning read to end of file. <p> <a href='im_vips2csv.3.html'><b>im_vips2csv(3)</b></a> writes the VIPS image to the file as ascii text, one line of text per scanline. Complex numbers are written as "(real,imaginary)" and will need extra parsing I guess. <p> Write options can be embedded in the filename. The options can be given in any order and are: <p> sep:separator-string<br> <p> The string to use to separate numbers in the output. The default is "\t" (tab). <p> <h2><a name='sect3' href='#toc3'>Examples</a></h2> <p> im_csv2vips( "fred.csv:skip:58,sep:,,line:3", out );<br> <p> Will read three lines starting at line 59, with space, comma and tab as the allowed separators. Note that the ’,’ has to be escaped with a backslash. <p> im_vips2csv fred.jpg fred.csv:sep:t<br> <p> Convert a jpeg to CSV, separating numbers with tab characters. <p> <h2><a name='sect4' href='#toc4'>See Also</a></h2> <a href='im_read_dmask.3.html'>im_read_dmask(3)</a> , <a href='im_ppm2vips.3.html'>im_ppm2vips(3)</a> <h2><a name='sect5' href='#toc5'>Copyright</a></h2> Hey, you want this? You have it! <p> <hr><p> <a name='toc'><b>Table of Contents</b></a><p> <ul> <li><a name='toc0' href='#sect0'>Name</a></li> <li><a name='toc1' href='#sect1'>Synopsis</a></li> <li><a name='toc2' href='#sect2'>Description</a></li> <li><a name='toc3' href='#sect3'>Examples</a></li> <li><a name='toc4' href='#sect4'>See Also</a></li> <li><a name='toc5' href='#sect5'>Copyright</a></li> </ul> </body> </html>