# define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf)
#endif
- if (setjmp(png_jmpbuf(png_read_ptr))){
- png_destroy_read_struct(&png_read_ptr, &info_ptr, (png_infopp)NULL);
- return 0;
- }
+ if (setjmp(png_jmpbuf(png_read_ptr))) {
+ png_destroy_read_struct(&png_read_ptr, &info_ptr, (png_infopp) NULL);
+ return 0;
+ }
png_init_io(png_read_ptr, fd);
png_read_info(png_read_ptr, info_ptr);
if (im->minval > im->maxval) {
if (im->minval > 0)
im->minval = 0.99 * im->maxval;
- else
+ else
im->minval = 1.01 * im->maxval;
}
/* make sure min and max are not equal */
- if (AlmostEqual2sComplement(im->minval,im->maxval,4)) {
- if (im->maxval > 0)
+ if (AlmostEqual2sComplement(im->minval, im->maxval, 4)) {
+ if (im->maxval > 0)
im->maxval *= 1.01;
else
im->maxval *= 0.99;
/* make sure min and max are not both zero */
- if (AlmostEqual2sComplement(im->maxval,0,4)) {
+ if (AlmostEqual2sComplement(im->maxval, 0, 4)) {
im->maxval = 1.0;
}
}