7 Replies Latest reply on Sep 10, 2007 3:13 AM by Günter Schenk

    Multiple Upload Image Problem - Resize GIF files

    oicram Level 1
      The Multiple Image Upload script seems to handle .jpg images without problems.
      However, .gif files return the error:

      "Error converting image (image resize). Image processing library not available or does not support operation. (imagemagick library is not working or not found)."

      The problem is caused by the fact that script that I'm using tries to pass a parameter that is not valid for gif processing:

      myimage.gif' '-quality' '80'

      The "quality" parameter works only for jpeg and .png files as described here:

      http://www.imagemagick.org/script/command-line-options.php#quality

      Please ensure that the script makes difference between .gif and .jpeg files and use the correct parameters so we can resize the images properly.

      Thanks in advance,
      Márcio
        • 1. Re: Multiple Upload Image Problem - Resize GIF files
          Günter Schenk Level 4
          Hi Marcio,

          hope this is not a stupid question, lol :: do you actually have imagemagick installed as php module and defined it as ADDT´s "preferred library" ?

          Günter Schenk
          Adobe Community Expert, Dreamweaver
          • 2. Re: Multiple Upload Image Problem - Resize GIF files
            oicram Level 1
            Yes. The module is on the host, and yes imagemagick is installed as preferred library.

            I'm using now GD library. Some files get more compressed. But I think I prefer the quality of imagemagick.

            Can you tell me the inconveniance of using GD instead of Imagemagick, or its, shortly similar?

            Thanks
            • 3. Re: Multiple Upload Image Problem - Resize GIF files
              Günter Schenk Level 4
              Hi Marcio,

              >>
              Can you tell me the inconveniance of using GD instead of Imagemagick, or its, shortly similar?
              >>

              sorry, but never worked with ImageMagick so far, so I can´t compare

              >>
              The "quality" parameter works only for jpeg and .png files as described here
              >>

              yeah, it seems that this is a small bug in ADDT´s "includes/common/lib/image/KT_Image.class.php" file. Was just checking the code in there, and indeed it adds this extra parameter regardless the image type -- but I do have an idea how this file can be modified to not use this parameter if the file in question has the suffix ".gif".

              If you feel a little adventurous, I´ll happily invite you to modify some code in this file -- please let me know if you´re ready for some instructions. However, if so, please make a backup of this file first...

              Günter Schenk
              Adobe Community Expert, Dreamweaver
              • 4. Re: Multiple Upload Image Problem - Resize GIF files
                oicram Level 1
                If
                with imagemagick the quality/compression are must better
                Then
                I will be hapy to make the adventure and learn a little more
                else
                Well... maybe later.

                Sorry for this kind of IF Statement post, I'm a little obsessed here by a specific script that I will post here.

                Thanks for been here, you already a reference in this forum hm? :)
                • 5. Re: Multiple Upload Image Problem - Resize GIF files
                  Günter Schenk Level 4
                  Hi Marcio,

                  if ($wanna_process_gifs_with_imagemagick == 'yes'){
                  $my_response = "Günter, now let me know !";
                  }
                  else {
                  $my_response = "forget it !";
                  }

                  :-)

                  GD isn´t bad either, it´s just ADDT´s default image quality setting of 80% which might not be sufficient to you. However, this is something you can change in the file "includes/common/KT_config.inc.php" -- you´ll see an array of parameters in there, and one of them reads:

                  $KT_default_image_quality = "80";

                  If it´s not in there, please add this line in between -- and as you might guess, setting the value to 100 will instruct ADDT to always leave the image quality "as is".

                  Günter Schenk
                  Adobe Community Expert, Dreamweaver
                  • 6. Re: Multiple Upload Image Problem - Resize GIF files
                    oicram Level 1
                    LOL

                    Perfect :)

                    Thanks a lot. I will use GD instead. If for some reason in the future I must use imagemagick I call back here, or maybe the bug is corrected with the ADDT team. :)

                    Thanks for the $KT_default_image_quality tip.
                    • 7. Re: Multiple Upload Image Problem - Resize GIF files
                      Günter Schenk Level 4
                      Hi Marcio,

                      I think that so far noone seemed to have stumbled across this bug, because the vast majority of web hosts don´t have Imagemagick installed.

                      Cheers,
                      Günter Schenk
                      Adobe Community Expert, Dreamweaver