Removed trailing whitespace.
[synfig.git] / synfig-core / trunk / src / modules / mod_jpeg / mptr_jpeg.cpp
index 5dd32ef..0896450 100644 (file)
@@ -97,7 +97,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 +106,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 +123,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 +161,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 +172,7 @@ jpeg_mptr::jpeg_mptr(const char *file_name)
                for(y=0;y<surface_buffer.get_h();y++)
                {
                        int x;
-                       jpeg_read_scanlines(&cinfo, buffer, 1);                 
+                       jpeg_read_scanlines(&cinfo, buffer, 1);
                        for(x=0;x<surface_buffer.get_w();x++)
                        {
                                float r=gamma().g_U8_to_F32((unsigned char)buffer[0][x*3+0]);
@@ -195,11 +195,11 @@ jpeg_mptr::jpeg_mptr(const char *file_name)
                                }
                }
                break;
-                       
+
        case 1:
                for(y=0;y<surface_buffer.get_h();y++)
                {
-                       jpeg_read_scanlines(&cinfo, buffer, 1);                 
+                       jpeg_read_scanlines(&cinfo, buffer, 1);
                        for(x=0;x<surface_buffer.get_w();x++)
                        {
                                float gray=gamma().g_U8_to_F32((unsigned char)buffer[0][x]);
@@ -220,19 +220,19 @@ jpeg_mptr::jpeg_mptr(const char *file_name)
                throw String("error on importer construction, *WRITEME*6");
                return;
        }
-       
+
        /* Step 7: Finish decompression */
-       
+
        (void) jpeg_finish_decompress(&cinfo);
        /* We can ignore the return value since suspension is not possible
        * with the stdio data source.
        */
-       
+
        /* Step 8: Release JPEG decompression object */
-       
+
        /* This is an important step since it will release a good deal of memory. */
        jpeg_destroy_decompress(&cinfo);
-       
+
        /* After finish_decompress, we can close the input file.
        * Here we postpone it until after no more JPEG errors are possible,
        * so as to simplify the setjmp error logic above.  (Actually, I don't