gmic/gmic-overflow.diff

27 lines
1.5 KiB
Diff
Raw Normal View History

Accepting request 315257 from home:garloff:branches:graphics - Fix build of gmic with older 2.6 GIMP (SLE11). - Update to gmic-1.6.5.0: * https://www.flickr.com/groups/gmic/discuss/72157653514140862/ * New commands: -label3d, -head, -files * Improvements -repeat, -axes, -warn, -displacement, -files2video, -apply_files * Math parser now supports sqr() * Bugfixes: Iain Fergusson denoising with selections and new layers, video stream, -display garbage, -graph, -display_graph, -plot with plot_type=3, 3d rendering, -camera with specified resolution. - Update to gmic-1.6.3.1: * https://www.flickr.com/groups/gmic/discuss/72157652079823575/ * New commands: -pack, -x_landscape * Improvements for 3d object rendering with z-buffer * Shared gmicrc resource directory * Math parser supporrts isfile(path), isdir(path) and fdate() now. * libgmic now uses libpng, libtiff, libjpeg, libcurl, libfftw. * Added some tooltips (gimp plugin) * Bugfixes: Possible buffer overflows in plugins - Update to gmic-1.6.2.0: * https://www.flickr.com/groups/gmic/discuss/72157651409869115/ * New commands -apply_timeout, -boxfilter, -serialize, -unserialize, -fps, -transition. * New filters Sequences / Spatial transition, Colors / Transfer colors [advanced] * Improved error message line numbers in -if .. -endif block. * Improved -blur, -displacement, - input, -warp * Compressed storage of custom commands OBS-URL: https://build.opensuse.org/request/show/315257 OBS-URL: https://build.opensuse.org/package/show/graphics/gmic?expand=0&rev=5
2015-07-07 17:18:59 +02:00
Index: gmic-1.6.5.0/src/CImg.h
===================================================================
Accepting request 315257 from home:garloff:branches:graphics - Fix build of gmic with older 2.6 GIMP (SLE11). - Update to gmic-1.6.5.0: * https://www.flickr.com/groups/gmic/discuss/72157653514140862/ * New commands: -label3d, -head, -files * Improvements -repeat, -axes, -warn, -displacement, -files2video, -apply_files * Math parser now supports sqr() * Bugfixes: Iain Fergusson denoising with selections and new layers, video stream, -display garbage, -graph, -display_graph, -plot with plot_type=3, 3d rendering, -camera with specified resolution. - Update to gmic-1.6.3.1: * https://www.flickr.com/groups/gmic/discuss/72157652079823575/ * New commands: -pack, -x_landscape * Improvements for 3d object rendering with z-buffer * Shared gmicrc resource directory * Math parser supporrts isfile(path), isdir(path) and fdate() now. * libgmic now uses libpng, libtiff, libjpeg, libcurl, libfftw. * Added some tooltips (gimp plugin) * Bugfixes: Possible buffer overflows in plugins - Update to gmic-1.6.2.0: * https://www.flickr.com/groups/gmic/discuss/72157651409869115/ * New commands -apply_timeout, -boxfilter, -serialize, -unserialize, -fps, -transition. * New filters Sequences / Spatial transition, Colors / Transfer colors [advanced] * Improved error message line numbers in -if .. -endif block. * Improved -blur, -displacement, - input, -warp * Compressed storage of custom commands OBS-URL: https://build.opensuse.org/request/show/315257 OBS-URL: https://build.opensuse.org/package/show/graphics/gmic?expand=0&rev=5
2015-07-07 17:18:59 +02:00
--- gmic-1.6.5.0.orig/src/CImg.h
+++ gmic-1.6.5.0/src/CImg.h
@@ -49065,9 +49065,9 @@ namespace cimg_library_suffixed {
Accepting request 280593 from home:garloff:branches:graphics - Update to gmic-1.6.0.3: * New GIMP filters Degradation/Dirty, Rendering/Lightning, Layers/Colors to Layers * New commands rgb2int and int2rgb * New preferred .gmz image list file format * New -nlmeans denoising algorithm * Improvements to -bilateral, -peronamalik_flow, -apply_parallel, (= -ap), -split, -discard, -colormap, -displacement, vanvliet, -belnd_median * Bugfixes around -output codec, -eigen, -center3d, -normalize3d, -split3d, -label - Update to gmic-1.6.0.2: * New -peronamalik_flow (diffusion smoothing) * New -x_select_function1d and -x_color_curves * New --guided, -cumulate * New -apply_video, -video2files, -files2video, -average_video * New -dct and -idct * Improvements to -parallel * Improving -fitscreen and tiff -output * Improvements for -snapshot3d, -text, -fft, -ifft, -blur * Major ZArt update * Bugfixes for -deconvolve_fft, -bilateral, -gaussian, -srand - Update to gmic-1.6.0.1: * New: const(value) and button() typedefs to describe filters. * Filter return status can be a list now. * GIMP plug-in now has default capability to open display windows. * New -x_segment (Contours/Extract Foreground). * Double underscore vars are thread shared globals. * New -x_select_color, -x_select_palette, -input_gpl, -x_colorize * C++11 support in CImg, avoiding uneeded image copies OBS-URL: https://build.opensuse.org/request/show/280593 OBS-URL: https://build.opensuse.org/package/show/graphics/gmic?expand=0&rev=4
2015-01-09 16:02:09 +01:00
filename?filename:"(FILE*)");
#endif
std::FILE *const nfile = file?file:cimg::fopen(filename,"wb");
const char *const ptype = pixel_type(), *const etype = cimg::endianness()?"big":"little";
Accepting request 315257 from home:garloff:branches:graphics - Fix build of gmic with older 2.6 GIMP (SLE11). - Update to gmic-1.6.5.0: * https://www.flickr.com/groups/gmic/discuss/72157653514140862/ * New commands: -label3d, -head, -files * Improvements -repeat, -axes, -warn, -displacement, -files2video, -apply_files * Math parser now supports sqr() * Bugfixes: Iain Fergusson denoising with selections and new layers, video stream, -display garbage, -graph, -display_graph, -plot with plot_type=3, 3d rendering, -camera with specified resolution. - Update to gmic-1.6.3.1: * https://www.flickr.com/groups/gmic/discuss/72157652079823575/ * New commands: -pack, -x_landscape * Improvements for 3d object rendering with z-buffer * Shared gmicrc resource directory * Math parser supporrts isfile(path), isdir(path) and fdate() now. * libgmic now uses libpng, libtiff, libjpeg, libcurl, libfftw. * Added some tooltips (gimp plugin) * Bugfixes: Possible buffer overflows in plugins - Update to gmic-1.6.2.0: * https://www.flickr.com/groups/gmic/discuss/72157651409869115/ * New commands -apply_timeout, -boxfilter, -serialize, -unserialize, -fps, -transition. * New filters Sequences / Spatial transition, Colors / Transfer colors [advanced] * Improved error message line numbers in -if .. -endif block. * Improved -blur, -displacement, - input, -warp * Compressed storage of custom commands OBS-URL: https://build.opensuse.org/request/show/315257 OBS-URL: https://build.opensuse.org/package/show/graphics/gmic?expand=0&rev=5
2015-07-07 17:18:59 +02:00
- if (std::strstr(ptype,"unsigned")==ptype) std::fprintf(nfile,"%u unsigned_%s %s_endian\n",_width,ptype + 9,etype);
+ if (std::strlen(ptype) > 9 && std::strstr(ptype,"unsigned")==ptype) std::fprintf(nfile,"%u unsigned_%s %s_endian\n",_width,ptype + 9,etype);
else std::fprintf(nfile,"%u %s %s_endian\n",_width,ptype,etype);
cimglist_for(*this,l) {
const CImg<T>& img = _data[l];
Accepting request 280593 from home:garloff:branches:graphics - Update to gmic-1.6.0.3: * New GIMP filters Degradation/Dirty, Rendering/Lightning, Layers/Colors to Layers * New commands rgb2int and int2rgb * New preferred .gmz image list file format * New -nlmeans denoising algorithm * Improvements to -bilateral, -peronamalik_flow, -apply_parallel, (= -ap), -split, -discard, -colormap, -displacement, vanvliet, -belnd_median * Bugfixes around -output codec, -eigen, -center3d, -normalize3d, -split3d, -label - Update to gmic-1.6.0.2: * New -peronamalik_flow (diffusion smoothing) * New -x_select_function1d and -x_color_curves * New --guided, -cumulate * New -apply_video, -video2files, -files2video, -average_video * New -dct and -idct * Improvements to -parallel * Improving -fitscreen and tiff -output * Improvements for -snapshot3d, -text, -fft, -ifft, -blur * Major ZArt update * Bugfixes for -deconvolve_fft, -bilateral, -gaussian, -srand - Update to gmic-1.6.0.1: * New: const(value) and button() typedefs to describe filters. * Filter return status can be a list now. * GIMP plug-in now has default capability to open display windows. * New -x_segment (Contours/Extract Foreground). * Double underscore vars are thread shared globals. * New -x_select_color, -x_select_palette, -input_gpl, -x_colorize * C++11 support in CImg, avoiding uneeded image copies OBS-URL: https://build.opensuse.org/request/show/280593 OBS-URL: https://build.opensuse.org/package/show/graphics/gmic?expand=0&rev=4
2015-01-09 16:02:09 +01:00
std::fprintf(nfile,"%u %u %u %u",img._width,img._height,img._depth,img._spectrum);
Accepting request 315257 from home:garloff:branches:graphics - Fix build of gmic with older 2.6 GIMP (SLE11). - Update to gmic-1.6.5.0: * https://www.flickr.com/groups/gmic/discuss/72157653514140862/ * New commands: -label3d, -head, -files * Improvements -repeat, -axes, -warn, -displacement, -files2video, -apply_files * Math parser now supports sqr() * Bugfixes: Iain Fergusson denoising with selections and new layers, video stream, -display garbage, -graph, -display_graph, -plot with plot_type=3, 3d rendering, -camera with specified resolution. - Update to gmic-1.6.3.1: * https://www.flickr.com/groups/gmic/discuss/72157652079823575/ * New commands: -pack, -x_landscape * Improvements for 3d object rendering with z-buffer * Shared gmicrc resource directory * Math parser supporrts isfile(path), isdir(path) and fdate() now. * libgmic now uses libpng, libtiff, libjpeg, libcurl, libfftw. * Added some tooltips (gimp plugin) * Bugfixes: Possible buffer overflows in plugins - Update to gmic-1.6.2.0: * https://www.flickr.com/groups/gmic/discuss/72157651409869115/ * New commands -apply_timeout, -boxfilter, -serialize, -unserialize, -fps, -transition. * New filters Sequences / Spatial transition, Colors / Transfer colors [advanced] * Improved error message line numbers in -if .. -endif block. * Improved -blur, -displacement, - input, -warp * Compressed storage of custom commands OBS-URL: https://build.opensuse.org/request/show/315257 OBS-URL: https://build.opensuse.org/package/show/graphics/gmic?expand=0&rev=5
2015-07-07 17:18:59 +02:00
@@ -49615,9 +49615,9 @@ namespace cimg_library_suffixed {
#endif
CImgList<ucharT> stream;
CImg<charT> tmpstr(128);
const char *const ptype = pixel_type(), *const etype = cimg::endianness()?"big":"little";
- if (std::strstr(ptype,"unsigned")==ptype)
+ if (std::strlen(ptype) > 9 && std::strstr(ptype,"unsigned")==ptype)
cimg_snprintf(tmpstr,tmpstr._width,"%u unsigned_%s %s_endian\n",_width,ptype + 9,etype);
else
cimg_snprintf(tmpstr,tmpstr._width,"%u %s %s_endian\n",_width,ptype,etype);
CImg<ucharT>::string(tmpstr,false).move_to(stream);