~cosme/ubuntu/precise/freeimage/freeimage-3.15.1

« back to all changes in this revision

Viewing changes to Source/FreeImage/PluginHDR.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Cosme Domínguez Díaz
  • Date: 2010-07-20 13:42:15 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20100720134215-xt1454zaedv3b604
Tags: 3.13.1-0ubuntu1
* New upstream release. Closes: (LP: #607800)
 - Updated debian/freeimage-get-orig-source script.
 - Removing no longer necessary debian/patches/* and
   the patch system in debian/rules.
 - Updated debian/rules to work with the new Makefiles.
 - Drop from -O3 to -O2 and use lzma compression saves
   ~10 MB of free space. 
* lintian stuff
 - fixed debhelper-but-no-misc-depends
 - fixed ldconfig-symlink-missing-for-shlib

Show diffs side-by-side

added added

removed removed

Lines of Context:
273
273
        }
274
274
        // The #? is to identify file type, the programtype is optional
275
275
        sprintf(buffer, "#?%s\n", programtype);
276
 
        if(io->write_proc(buffer, 1, strlen(buffer), handle) < 1)
 
276
        if(io->write_proc(buffer, 1, (unsigned int)strlen(buffer), handle) < 1)
277
277
                return rgbe_Error(rgbe_write_error, NULL);
278
278
        sprintf(buffer, "%s\n", info->comment);
279
 
        if(io->write_proc(buffer, 1, strlen(buffer), handle) < 1)
 
279
        if(io->write_proc(buffer, 1, (unsigned int)strlen(buffer), handle) < 1)
280
280
                return rgbe_Error(rgbe_write_error, NULL);
281
281
        sprintf(buffer, "FORMAT=32-bit_rle_rgbe\n");
282
 
        if(io->write_proc(buffer, 1, strlen(buffer), handle) < 1)
 
282
        if(io->write_proc(buffer, 1, (unsigned int)strlen(buffer), handle) < 1)
283
283
                return rgbe_Error(rgbe_write_error, NULL);
284
284
        if(info && (info->valid & RGBE_VALID_GAMMA)) {
285
285
                sprintf(buffer, "GAMMA=%g\n", info->gamma);
286
 
                if(io->write_proc(buffer, 1, strlen(buffer), handle) < 1)
 
286
                if(io->write_proc(buffer, 1, (unsigned int)strlen(buffer), handle) < 1)
287
287
                        return rgbe_Error(rgbe_write_error, NULL);
288
288
        }
289
289
        if(info && (info->valid & RGBE_VALID_EXPOSURE)) {
290
290
                sprintf(buffer,"EXPOSURE=%g\n", info->exposure);
291
 
                if(io->write_proc(buffer, 1, strlen(buffer), handle) < 1)
 
291
                if(io->write_proc(buffer, 1, (unsigned int)strlen(buffer), handle) < 1)
292
292
                        return rgbe_Error(rgbe_write_error, NULL);
293
293
        }
294
294
        sprintf(buffer, "\n-Y %d +X %d\n", height, width);
295
 
        if(io->write_proc(buffer, 1, strlen(buffer), handle) < 1)
 
295
        if(io->write_proc(buffer, 1, (unsigned int)strlen(buffer), handle) < 1)
296
296
                return rgbe_Error(rgbe_write_error, NULL);
297
297
 
298
298
        return TRUE;
614
614
                        // allocate a RGBF image
615
615
                        dib = FreeImage_AllocateT(FIT_RGBF, width, height);
616
616
                        if(!dib) {
617
 
                                throw "Memory allocation failed";
 
617
                                throw FI_MSG_ERROR_MEMORY;
618
618
                        }
619
619
 
620
620
                        // read the image pixels and fill the dib