Menu

#1643 jpeg terminal broken in windows binaries

None
closed-fixed
Windows (113)
2016-02-05
2015-06-28
Anonymous
No

Since gnuplot4.6.6, the jpeg terminal in the official windows binaries gives zero output, both in 32 and 64 bit versions.

set term jpeg; set out 'test.jpg'
plot x
set out; set term wxt

just creates an empty file. Previous versions work fine. I can't build myself at the moment, so i'm not sure if the problem is linked to a specific libgd version.

Discussion

  • Karl Ratzsch

    Karl Ratzsch - 2015-07-08

    The console version in 5.0.1 is more verbose on this:

    gnuplot> set term jpeg
    gnuplot> set out "test.jpeg
    gnuplot> plot x
    gd-jpeg: JPEG library reports unrecoverable error: JPEG parameter struct mismatch: library thinks size is 584, caller expects 568
    

    (thanks to Jörg Buchholz who pointed this out in a newspost)

     
  • Tatsuro MATSUOKA

    Hmmmm!
    Perhaps jpeg library for windows build was not build in proper way.
    I will look into this.

    Meanwhile make an image in png format by png or pngcairo terminals and
    translate it to jpeg.
    Imagemagick is a good tool to do this.
    http://www.imagemagick.org/script/index.php
    http://www.imagemagick.org/script/convert.php

    convert rose.png rose.jpg

     
  • Tatsuro MATSUOKA

    The reason gd-jpeg error comes from my careless production of gd and jpeg libraries.
    (For MinGW build, I have to take care 'boolean' type definition that I have forgotten that when compilers were changed. Th previous compiler gave an error in compile stage but new compilers said nothing.)

    I can prepare corrected cvs binaries in the near future (may be tomorrow). I will announce here and the gnuplot-beta ML when it will be done. For 5.0.1 binary (4.6.6 or 4.6.7?), I will consult with the developers of gnuplot.

     
  • Tatsuro MATSUOKA

    This is not release information.

    This is a notice when jpeg library is built on mingw platfrom.

    The type of boolean should be specified.
    For mingw, it is to be "unsigned char".

    The below is the patch for jmorecfg.h in libjpeg-turbo-1.4.1.
    For original libjpeg libray, a similar patch will be required to jmorecfg.h.

    --- jmorecfg.orig.h 2014-11-25 19:07:43.000000000 +0900
    +++ jmorecfg.h 2015-07-11 16:52:50.159816700 +0900
    @@ -139,6 +139,12 @@
    typedef unsigned int UINT16;
    #endif /* HAVE_UNSIGNED_SHORT */

    +/* Define boolean as unsigned char for mingw */
    +#ifdef __MINGW32__
    +#define HAVE_BOOLEAN
    + typedef unsigned char boolean;
    +#endif
    +
    /* INT16 must hold at least the values -32768..32767. */

    #ifndef XMD_H /* X11/xmd.h correctly defines INT16 */
    @@ -148,8 +154,10 @@
    /* INT32 must hold at least signed 32-bit values. */

    #ifndef XMD_H /* X11/xmd.h correctly defines INT32 */
    +#ifndef __MINGW32__ /* MinGW also defines INT32 basetsd.h*/
    typedef long INT32;
    #endif
    +#endif

    /* Datatype used for image dimensions. The JPEG standard only supports
    * images up to 64K*64K due to 16-bit fields in SOF markers. Therefore

     
  • Tatsuro MATSUOKA

    I have uploaded CVS binaries for windows in which jpeg terminal bug is fixed.

    http://www.tatsuromatsuoka.com/gnuplot/Eng/winbin/

    An attachment file is created by a corrected cvs version gnuplot for windows
    (The ChangeLog date is 2015-07-11)

    gnuplot> set term jpeg
    Terminal type set to 'jpeg'
    Options are 'nocrop enhanced size 640,480 font "arial,12" '
    gnuplot> set out 'sin.jpg'
    gnuplot> plot sin(x)
    gnuplot> set out

    I will also announce in the gnuplot-beta ML.

     
  • Tatsuro MATSUOKA

    • status: open --> pending-fixed
    • Group: -->
    • Priority: -->
     
  • Tatsuro MATSUOKA

    • assigned_to: Tatsuro MATSUOKA
     
  • Tatsuro MATSUOKA

    I have updated 5.0.1 binaries and uploaded 4.6.7 binaries. Now bug is fixed.

     
  • Tatsuro MATSUOKA

    • status: pending-fixed --> closed-fixed
     
  • Karl Ratzsch

    Karl Ratzsch - 2015-09-14

    The change in libgd seems to have sprung bug no. #1614 now also for ver 5.0.1.

     
  • Tatsuro MATSUOKA

    The bug #1614 is now fixed in a 5.0.3 source tar ball in 5.0 release candidate in File tag on the SF or 5.1 cvs source.

     

    Last edit: Tatsuro MATSUOKA 2016-02-05

Log in to post a comment.