No announcement yet.

gif png image gallery

  • Filter
  • Time
  • Show
Clear All
new posts

  • gif png image gallery

    it's possibile to read and create gif or png image with SC5 in addiction to jpg ? Can I use imagefrompng or imagefromgif functions in order to manage an image file gallery in my code (OnafterInsert or OnAfterUpdate) ?
    I used in a form a record with a field image file .jpg and works fine, but with .png or .gif I create a whole black image when I use imagefrompng or imageformgif functions.
    there are limitations in SC5 ? What image library use SC (GD2)?

  • #2
    Re: gif png image gallery

    ScriptCase already check the extension to use the proper function to handle the image.

    Always when you try to save png or gif you get an empty image?


    • #3
      Re: gif png image gallery

      SOLVED !

      $img = imagecreatetruecolor($larg, $alt); //Correct !!!

      the problem was in $quality value:

      @imagepng($img, $name_imgnew,$quality,PNG_ALL_FILTERS); // Wrong, due to $quality = 80 !!!

      @imagepng($img, $name_imgnew,$quality,PNG_ALL_FILTERS); //Correct due to $quality = 8 (the right value are beetween 0 and 9) !!!

      The resize of all img (gif,png,jpg) are correct now !!!!


      • #4
        Re: gif png image gallery



        • #5
          it shouldnot be difficult for an image editor to [EDITED]. image gallery nowadays are becoming more and more powerful. also thank for the codes up here. still trying to figure out how to programme codes.