Page 64 of 64 FirstFirst ... 1454626364
Results 631 to 635 of 635
  1. #631
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,884
    Plugin Contributions
    89

    Default Re: Image Handler 5 (for v1.5.5) Support Thread

    Thanks for that! It looks like the 'transparent' setting for those 3 values is the root-cause of those logs. I'll be further investigating and have created a GitHub issue (https://github.com/lat9/zen_Image-Handler/issues/17) to track associated changes.

  2. #632
    Join Date
    Mar 2011
    Posts
    53
    Plugin Contributions
    0

    Default Re: Image Handler 5 (for v1.5.5) Support Thread

    Quote Originally Posted by lat9 View Post
    Thanks for that! It looks like the 'transparent' setting for those 3 values is the root-cause of those logs. I'll be further investigating and have created a GitHub issue (https://github.com/lat9/zen_Image-Handler/issues/17) to track associated changes.
    I have currently solved it by replacing part on the code around line 1055:
    /**
    * @param $bg
    *
    * @return array|false
    */
    protected function get_background_rgb($bg)
    {
    $color = false;

    $bg = trim(str_replace('transparent', '', $bg));
    list($red, $green, $blue)= preg_split('/[, :]/', $bg);
    if (preg_match('/\d+/', $red.$green.$blue)) {
    $red = min((int)$red, 255);
    $green = min((int)$green, 255);
    $blue = min((int)$blue, 255);
    $color = ['r' => $red, 'g' => $green, 'b' => $blue];
    }
    return $color;
    }

    Replaced with:

    protected function get_background_rgb($bg)
    {
    $color = false;

    $bg = trim(str_replace('transparent', '', $bg));
    $components = preg_split('/[, :]/', $bg);

    if (count($components) === 3 && preg_match('/^\d+$/', $components[0]) && preg_match('/^\d+$/', $components[1]) && preg_match('/^\d+$/', $components[2])) {
    $red = min((int)$components[0], 255);
    $green = min((int)$components[1], 255);
    $blue = min((int)$components[2], 255);
    $color = ['r' => $red, 'g' => $green, 'b' => $blue];
    }

    return $color;
    }

  3. #633
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,884
    Plugin Contributions
    89

    Default Re: Image Handler 5 (for v1.5.5) Support Thread

    Quote Originally Posted by siilike1232 View Post
    I have currently solved it by replacing part on the code around line 1055:
    /**
    * @param $bg
    *
    * @return array|false
    */
    protected function get_background_rgb($bg)
    {
    $color = false;

    $bg = trim(str_replace('transparent', '', $bg));
    list($red, $green, $blue)= preg_split('/[, :]/', $bg);
    if (preg_match('/\d+/', $red.$green.$blue)) {
    $red = min((int)$red, 255);
    $green = min((int)$green, 255);
    $blue = min((int)$blue, 255);
    $color = ['r' => $red, 'g' => $green, 'b' => $blue];
    }
    return $color;
    }

    Replaced with:

    protected function get_background_rgb($bg)
    {
    $color = false;

    $bg = trim(str_replace('transparent', '', $bg));
    $components = preg_split('/[, :]/', $bg);

    if (count($components) === 3 && preg_match('/^\d+$/', $components[0]) && preg_match('/^\d+$/', $components[1]) && preg_match('/^\d+$/', $components[2])) {
    $red = min((int)$components[0], 255);
    $green = min((int)$components[1], 255);
    $blue = min((int)$components[2], 255);
    $color = ['r' => $red, 'g' => $green, 'b' => $blue];
    }

    return $color;
    }
    Thanks for that.

  4. #634
    Join Date
    Jan 2013
    Posts
    823
    Plugin Contributions
    0

    Default Re: Image Handler 5 (for v1.5.5) Support Thread

    im getting this error on zen version 1.56c
    PHP Warning: imagecreatefrompng(): '/var/www/clients/client1/web3/web/images/product_pictures/3 Commercial Stair NosingBA_01.png' is not a valid PNG file in /var/www/clients/client1/web3/web/includes/classes/bmz_image_handler.class.php on line 919.
    Code:
    [17-Aug-2024 18:58:20 UTC] Request URI: /Metal_Trim_Transitions/Carpet_Carpet_Tile_Solutions/Carpet_Stair_Nosing/3_Commercial_Stair_Nosing/Futura_CM_609_3_Commercial_Stair_Nosing_12_Length_Buffed_Aluminum, IP address: 193.116.224.72
    #1  imagecreatefrompng() called at [/var/www/clients/client1/web3/web/includes/classes/bmz_image_handler.class.php:919]
    #2  ih_image->load_imageGD() called at [/var/www/clients/client1/web3/web/includes/classes/bmz_image_handler.class.php:717]
    #3  ih_image->resize_imageGD() called at [/var/www/clients/client1/web3/web/includes/classes/bmz_image_handler.class.php:400]
    #4  ih_image->get_resized_image() called at [/var/www/clients/client1/web3/web/includes/classes/bmz_image_handler.class.php:258]
    #5  ih_image->get_local() called at [/var/www/clients/client1/web3/web/includes/functions/extra_functions/functions_bmz_image_handler.php:123]
    #6  handle_image() called at [/var/www/clients/client1/web3/web/includes/functions/html_output.php:202]
    #7  zen_image() called at [/var/www/clients/client1/web3/web/includes/modules/marcus/additional_images.php:150]
    #8  require(/var/www/clients/client1/web3/web/includes/modules/marcus/additional_images.php) called at [/var/www/clients/client1/web3/web/includes/templates/marcus/templates/tpl_modules_additional_images.php:13]
    #9  require(/var/www/clients/client1/web3/web/includes/templates/marcus/templates/tpl_modules_additional_images.php) called at [/var/www/clients/client1/web3/web/includes/templates/marcus/templates/tpl_product_info_display.php:47]
    #10 require(/var/www/clients/client1/web3/web/includes/templates/marcus/templates/tpl_product_info_display.php) called at [/var/www/clients/client1/web3/web/includes/modules/pages/product_info/main_template_vars.php:281]
    #11 require(/var/www/clients/client1/web3/web/includes/modules/pages/product_info/main_template_vars.php) called at [/var/www/clients/client1/web3/web/includes/templates/marcus/common/tpl_main_page.php:261]
    #12 require(/var/www/clients/client1/web3/web/includes/templates/marcus/common/tpl_main_page.php) called at [/var/www/clients/client1/web3/web/index.php:97]
    --> PHP Warning: imagecreatefrompng(): '/var/www/clients/client1/web3/web/images/product_pictures/3 Commercial Stair NosingBA_01.png' is not a valid PNG file in /var/www/clients/client1/web3/web/includes/classes/bmz_image_handler.class.php on line 919.

  5. #635
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,884
    Plugin Contributions
    89

    Default Re: Image Handler 5 (for v1.5.5) Support Thread

    Quote Originally Posted by jimmie View Post
    im getting this error on zen version 1.56c
    PHP Warning: imagecreatefrompng(): '/var/www/clients/client1/web3/web/images/product_pictures/3 Commercial Stair NosingBA_01.png' is not a valid PNG file in /var/www/clients/client1/web3/web/includes/classes/bmz_image_handler.class.php on line 919.
    Code:
    [17-Aug-2024 18:58:20 UTC] Request URI: /Metal_Trim_Transitions/Carpet_Carpet_Tile_Solutions/Carpet_Stair_Nosing/3_Commercial_Stair_Nosing/Futura_CM_609_3_Commercial_Stair_Nosing_12_Length_Buffed_Aluminum, IP address: 193.116.224.72
    #1  imagecreatefrompng() called at [/var/www/clients/client1/web3/web/includes/classes/bmz_image_handler.class.php:919]
    #2  ih_image->load_imageGD() called at [/var/www/clients/client1/web3/web/includes/classes/bmz_image_handler.class.php:717]
    #3  ih_image->resize_imageGD() called at [/var/www/clients/client1/web3/web/includes/classes/bmz_image_handler.class.php:400]
    #4  ih_image->get_resized_image() called at [/var/www/clients/client1/web3/web/includes/classes/bmz_image_handler.class.php:258]
    #5  ih_image->get_local() called at [/var/www/clients/client1/web3/web/includes/functions/extra_functions/functions_bmz_image_handler.php:123]
    #6  handle_image() called at [/var/www/clients/client1/web3/web/includes/functions/html_output.php:202]
    #7  zen_image() called at [/var/www/clients/client1/web3/web/includes/modules/marcus/additional_images.php:150]
    #8  require(/var/www/clients/client1/web3/web/includes/modules/marcus/additional_images.php) called at [/var/www/clients/client1/web3/web/includes/templates/marcus/templates/tpl_modules_additional_images.php:13]
    #9  require(/var/www/clients/client1/web3/web/includes/templates/marcus/templates/tpl_modules_additional_images.php) called at [/var/www/clients/client1/web3/web/includes/templates/marcus/templates/tpl_product_info_display.php:47]
    #10 require(/var/www/clients/client1/web3/web/includes/templates/marcus/templates/tpl_product_info_display.php) called at [/var/www/clients/client1/web3/web/includes/modules/pages/product_info/main_template_vars.php:281]
    #11 require(/var/www/clients/client1/web3/web/includes/modules/pages/product_info/main_template_vars.php) called at [/var/www/clients/client1/web3/web/includes/templates/marcus/common/tpl_main_page.php:261]
    #12 require(/var/www/clients/client1/web3/web/includes/templates/marcus/common/tpl_main_page.php) called at [/var/www/clients/client1/web3/web/index.php:97]
    --> PHP Warning: imagecreatefrompng(): '/var/www/clients/client1/web3/web/images/product_pictures/3 Commercial Stair NosingBA_01.png' is not a valid PNG file in /var/www/clients/client1/web3/web/includes/classes/bmz_image_handler.class.php on line 919.
    That's PHP saying that it doesn't like product_pictures/3 Commercial Stair NosingBA_01.png.

    That could be because (a) the file's not a valid .png format or (b) the file name has those unwanted blanks in its name.

 

 
Page 64 of 64 FirstFirst ... 1454626364

Similar Threads

  1. v150 Image Handler 4 (for v1.5.x) Support Thread
    By DivaVocals in forum All Other Contributions/Addons
    Replies: 1684
    Last Post: 2 Oct 2022, 06:55 AM
  2. Attribute image replaces main product image on select [Support Thread]
    By exoticcorpse in forum All Other Contributions/Addons
    Replies: 158
    Last Post: 24 Aug 2020, 05:07 PM
  3. v139h Image Handler 3 Support Thread (for ZC v1.3.9)
    By DivaVocals in forum All Other Contributions/Addons
    Replies: 1095
    Last Post: 2 Oct 2017, 12:42 PM
  4. v138a Image Handler 2 (for ZC v1.3.8 ONLY) Support
    By timkroeger in forum All Other Contributions/Addons
    Replies: 7098
    Last Post: 12 Oct 2014, 03:48 AM
  5. Image Handler Support Please
    By nadinesky in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 30 Sep 2013, 03:47 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR