Page 64 of 66 FirstFirst ... 14546263646566 LastLast
Results 631 to 640 of 653
  1. #631
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,914
    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,914
    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
    828
    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,914
    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.

  6. #636
    Join Date
    Jan 2013
    Posts
    828
    Plugin Contributions
    0

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

    i am getting thousands of theses in logs and each1 is a different picture
    Code:
    [10-Sep-2024 12:45:35 UTC] Request URI: /Flooring/Tile_Stone/SFI_Porcelain_Wood_Plank/SFI_Porcelain_Wood_Plank_Bullnose/Townhouse_Bullnose_Collection/Townhouse_Bullnose_6_x_24_Wood_Barrel_TY03BN, IP address: 85.208.96.194
    #1  imagecreatefromjpeg() called at [/var/www/clients/client1/web3/web/includes/classes/bmz_image_handler.class.php:926]
    #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/extra_functions/pzen_marcus_template_functions.php:74]
    #7  pzen_marcus_image() called at [/var/www/clients/client1/web3/web/includes/functions/extra_functions/pzen_marcus_template_functions.php:601]
    #8  pzen_marcus_additional_images() called at [/var/www/clients/client1/web3/web/includes/functions/extra_functions/pzen_marcus_template_functions.php:704]
    #9  get_pzen_marcus_product_content() called at [/var/www/clients/client1/web3/web/includes/templates/marcus/templates/tpl_modules_related_products.php:65]
    #10 require(/var/www/clients/client1/web3/web/includes/templates/marcus/templates/tpl_modules_related_products.php) called at [/var/www/clients/client1/web3/web/includes/templates/marcus/templates/tpl_product_info_display.php:657]
    #11 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]
    #12 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]
    #13 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: imagecreatefromjpeg(): gd-jpeg: JPEG library reports unrecoverable error: Not a JPEG file: starts with 0x89 0x50 in /var/www/clients/client1/web3/web/includes/classes/bmz_image_handler.class.php on line 926.
    
    [10-Sep-2024 12:45:35 UTC] Request URI: /Flooring/Tile_Stone/SFI_Porcelain_Wood_Plank/SFI_Porcelain_Wood_Plank_Bullnose/Townhouse_Bullnose_Collection/Townhouse_Bullnose_6_x_24_Wood_Barrel_TY03BN, IP address: 85.208.96.194
    #1  imagecreatefromjpeg() called at [/var/www/clients/client1/web3/web/includes/classes/bmz_image_handler.class.php:926]
    #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/extra_functions/pzen_marcus_template_functions.php:74]
    #7  pzen_marcus_image() called at [/var/www/clients/client1/web3/web/includes/functions/extra_functions/pzen_marcus_template_functions.php:601]
    #8  pzen_marcus_additional_images() called at [/var/www/clients/client1/web3/web/includes/functions/extra_functions/pzen_marcus_template_functions.php:704]
    #9  get_pzen_marcus_product_content() called at [/var/www/clients/client1/web3/web/includes/templates/marcus/templates/tpl_modules_related_products.php:65]
    #10 require(/var/www/clients/client1/web3/web/includes/templates/marcus/templates/tpl_modules_related_products.php) called at [/var/www/clients/client1/web3/web/includes/templates/marcus/templates/tpl_product_info_display.php:657]
    #11 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]
    #12 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]
    #13 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: imagecreatefromjpeg(): '/var/www/clients/client1/web3/web/images/product_pictures/LL04.jpg' is not a valid JPEG file in /var/www/clients/client1/web3/web/includes/classes/bmz_image_handler.class.php on line 926.

  7. #637
    Join Date
    Feb 2014
    Location
    Germany
    Posts
    197
    Plugin Contributions
    0

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

    what color profile do the jpg files e.g. LL04.jpg have?

    You can send it to me via mail if you don't know how to check it.
    My Zen-Cart Vespa Shop.
    GDPR compliant Webhosting in Germany.

  8. #638
    Join Date
    Jun 2005
    Posts
    353
    Plugin Contributions
    0

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

    0x89 0x50 means that the image is actually a png file, but is misnammed with a jpg extension.
    2 + 2 = 5 for extremely large values of 2

    Pez Collectors Store •••••••• My Plugins List

  9. #639
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,741
    Plugin Contributions
    11

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

    Quote Originally Posted by gothstone View Post
    0x89 0x50 means that the image is actually a png file, but is misnammed with a jpg extension.
    hmmm... interesting bit of information....

    perhaps image handler should handle files with misnamed extensions?
    author of square Webpay.
    mxWorks now has Apple Pay and Google Pay. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  10. #640
    Join Date
    Jun 2005
    Posts
    353
    Plugin Contributions
    0

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

    Possible, but a lot of work. And if you go there you might as well add in removing invalid characters, fixing double extensions, etc. Certainly wouldn't be bad if someone wants to spend the time coding it.
    In case someone does, png starts with 0x89 0x50
    Jpg is 0xFF 0xD8
    Gif is 0x47 0x49 0x46
    Last edited by gothstone; 10 Sep 2024 at 09:50 PM.
    2 + 2 = 5 for extremely large values of 2

    Pez Collectors Store •••••••• My Plugins List

 

 

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