X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fmodules%2Fmod_jpeg%2Fmptr_jpeg.cpp;h=84f540306aaa2a999c33177236f8b6de8cd34453;hb=9459638ad6797b8139f1e9f0715c96076dbf0890;hp=5dd32efc7d5c6ac2bfd0abe6611528c4b67218fc;hpb=f0bb3efdc247acff17a7feb7c3d22911f47959f7;p=synfig.git diff --git a/synfig-core/trunk/src/modules/mod_jpeg/mptr_jpeg.cpp b/synfig-core/trunk/src/modules/mod_jpeg/mptr_jpeg.cpp index 5dd32ef..84f5403 100644 --- a/synfig-core/trunk/src/modules/mod_jpeg/mptr_jpeg.cpp +++ b/synfig-core/trunk/src/modules/mod_jpeg/mptr_jpeg.cpp @@ -1,8 +1,10 @@ -/*! ======================================================================== -** Synfig -** ppm Target Module -** $Id: mptr_jpeg.cpp,v 1.1.1.1 2005/01/04 01:23:11 darco Exp $ +/* === S Y N F I G ========================================================= */ +/*! \file mptr_jpeg.cpp +** \brief ppm Target Module ** +** $Id$ +** +** \legal ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley ** ** This package is free software; you can redistribute it and/or @@ -14,6 +16,7 @@ ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ** General Public License for more details. +** \endlegal ** ** === N O T E S =========================================================== ** @@ -59,7 +62,7 @@ SYNFIG_IMPORTER_INIT(jpeg_mptr); SYNFIG_IMPORTER_SET_NAME(jpeg_mptr,"jpeg"); SYNFIG_IMPORTER_SET_EXT(jpeg_mptr,"jpg"); SYNFIG_IMPORTER_SET_VERSION(jpeg_mptr,"0.1"); -SYNFIG_IMPORTER_SET_CVS_ID(jpeg_mptr,"$Id: mptr_jpeg.cpp,v 1.1.1.1 2005/01/04 01:23:11 darco Exp $"); +SYNFIG_IMPORTER_SET_CVS_ID(jpeg_mptr,"$Id$"); /* === M E T H O D S ======================================================= */ @@ -97,7 +100,7 @@ jpeg_mptr::jpeg_mptr(const char *file_name) { struct my_error_mgr jerr; filename=file_name; - + /* Open the file pointer */ FILE *file = fopen(file_name, "rb"); if (!file) @@ -106,9 +109,9 @@ jpeg_mptr::jpeg_mptr(const char *file_name) throw String("error on importer construction, *WRITEME*1"); return; } - + /* Step 1: allocate and initialize JPEG decompression object */ - + /* We set up the normal JPEG error routines, then override error_exit. */ cinfo.err = jpeg_std_error(&jerr.pub); jerr.pub.error_exit = my_error_exit; @@ -123,28 +126,28 @@ jpeg_mptr::jpeg_mptr(const char *file_name) } /* Now we can initialize the JPEG decompression object. */ jpeg_create_decompress(&cinfo); - + /* Step 2: specify data source (eg, a file) */ - + jpeg_stdio_src(&cinfo, file); - + /* Step 3: read file parameters with jpeg_read_header() */ - + (void) jpeg_read_header(&cinfo, TRUE); /* We can ignore the return value from jpeg_read_header since * (a) suspension is not possible with the stdio data source, and * (b) we passed TRUE to reject a tables-only JPEG file as an error. * See libjpeg.doc for more info. */ - + /* Step 4: set parameters for decompression */ - + /* In this example, we don't need to change any of the defaults set by * jpeg_read_header(), so we do nothing here. */ - + /* Step 5: Start decompressor */ - + (void) jpeg_start_decompress(&cinfo); /* We can ignore the return value since suspension is not possible * with the stdio data source. @@ -161,7 +164,7 @@ jpeg_mptr::jpeg_mptr(const char *file_name) synfig::error("jpeg_mptr: error: alloc of \"buffer\" failed (bug?)"); throw String("alloc of \"buffer\" failed (bug?)"); } - + int x; int y; surface_buffer.set_wh(cinfo.output_width,cinfo.output_height); @@ -172,7 +175,7 @@ jpeg_mptr::jpeg_mptr(const char *file_name) for(y=0;y