Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Imagick Issue Rate Topic   - - - - -

 

Posted 23 July 2019 - 01:20 PM #1

Getting this error with imagick
 
Function Imagick::setimageopacity() is deprecated
 
Any ideas?  Thanks


 
  • poppedweb
  • Authorized Reseller
  • Members
  • Join Date: 02-Aug 16
  • 549 posts

Posted 23 July 2019 - 04:19 PM #2

 

Getting this error with imagick
 
Function Imagick::setimageopacity() is deprecated
 
Any ideas?  Thanks

 

 

Seems to be self explanatory. Function is deprecated and CS-Cart takes ages to patch it again. So you are best off just placing a '@' in front of the function call.


PoppedWeb | sales@poppedweb.com | https://poppedweb.com
TurnKey Website Design | Add-Ons | Performance Audits | Dedicated Server Management
24/7 Support | Response within an hour (during working hours).

 

Posted 24 July 2019 - 04:08 AM #3

How do I do that?



 

Posted 26 July 2019 - 07:57 PM #4

I simply use only the GD and not the imagick.

I tried to set in the php options to ignore all errors and not display it but still displays them!

So I enabled GD only (and not the imagick or both of them) in the php settings and it works.

Cs cart says that will have problem with large sizes but honestly speaking we use jpg and optimal sizes in order to save space in our server and to load faster so we should not use large images by definition.



 
  • amdowney
  • Senior Member
  • Members
  • Join Date: 22-Oct 14
  • 254 posts

Posted 09 August 2019 - 10:30 AM #5

Same issue here, what is going on CS Cart?


Stores: CCTV Kits & www.jmtb.co.uk

 
  • andymike123
  • Advanced Member
  • Trial users
  • Join Date: 22-Feb 18
  • 65 posts

Posted 11 August 2019 - 04:46 AM #6

Hi,

I have the same issue. I hope CS-cart team see this and help since they recommend to use imagick :?



 
  • Shr3k
  • Junior Member
  • Members
  • Join Date: 25-Mar 08
  • 12 posts

Posted 14 August 2019 - 09:41 AM #7

CS-Cart - when one if (method_exists($imagick, 'setImageAlpha')) takes ages ...  :?


 
  • The Tool
  • Been Here Way Too Long Member
  • Members
  • Join Date: 30-Mar 07
  • 3843 posts

Posted 16 August 2019 - 03:14 PM #8

Here is the latest version of the file for anyone wanting to try it.

 

/app/lib/vendor/imagine/imagine/lib/Imagine/Imagick/Imagine.php

Attached File  Imagine.php   7.34KB   16 downloads

 

Edit:  Actually there are quite a few changes so you may just want to replace the following code.

 

Find:

                    $imagick->setImageOpacity($pixel->getColorValue(\Imagick::COLOR_ALPHA));

Replace:

                    ErrorHandling::ignoring(E_DEPRECATED, function () use ($imagick, $pixel) {
                        $imagick->setImageOpacity($pixel->getColorValue(\Imagick::COLOR_ALPHA));
                    });

                   



 
  • The Tool
  • Been Here Way Too Long Member
  • Members
  • Join Date: 30-Mar 07
  • 3843 posts

Posted 16 August 2019 - 10:38 PM #9

Since there were so many changes to the Imagine.php file, I went ahead and updated all of the files for imagine.  So far it has been running fine for most of the day.  I have attached the files.  Upload to the root of your installation and extract.

 

Attached File  Imagine_update.zip   5.83MB   83 downloads



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11400 posts

Posted 17 August 2019 - 04:40 PM #10

Thanks for the zip @tool!  Doesn't seem like a complex issue for cs-cart to have included in the 4.10.x updates.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • The Tool
  • Been Here Way Too Long Member
  • Members
  • Join Date: 30-Mar 07
  • 3843 posts

Posted 17 August 2019 - 05:24 PM #11

No problem.

 

You know, as well as I, that CSC doesn't update unless it's an issue for their entire customer base.  I am guessing that most haven't updated to imagick 3.4.4 because I didn't have the issue until I did.



 
  • poppedweb
  • Authorized Reseller
  • Members
  • Join Date: 02-Aug 16
  • 549 posts

Posted 17 August 2019 - 08:37 PM #12

No problem.

 

You know, as well as I, that CSC doesn't update unless it's an issue for their entire customer base.  I am guessing that most haven't updated to imagick 3.4.4 because I didn't have the issue until I did.

 

There are still so many flaws that have not yet been fixed. I still have simple to implement features from 4 years ago that have not yet been implemented (even after giving them a diff file on how to patch it). Now, even though this is unspeakable, what I found truly annoying, is that when Simtech requires something adjusted (e.g. SDK's for Amazon Pay), that CS-Cart clears their schedule immediately and prioritizes their requests. This is fair from a business perspective but now it is out of proportion. We asked this 2 years ago, so that we could use things like SES / SQS without an API that is as old as it gets. Now this summer, Simtech wanted to implement 'Amazon Pay', but for that, you need newer SDK's from Amazon. And ofcourse, these SDK's were immediately updated, without a hassle.

 

But that's not all. There are many things that CS-Cart can do to optimize the loading times of their store and their overall code quality. We still come across poorly documented code on a daily basis and when we report it, nothing is done with it. What's more, is that we are happy to contribute in some changes via pull requests (a code change request) but they simply will not allow it.

 

This has been going back and forth for many years now, until last summer. We simply decided to write our own e-commerce solution (for now private source), that provides way better speeds and actually updated API's and many more things. Besides that, it can also be scaled over multiple servers across multiple datacenters whilst maintaining an average TTFB of ~120ms. CS-Cart could have been like this, if they actually took our variety of tips for granted and listened to our tries to help them make the required technological changes.

 

But, it is what it is...


PoppedWeb | sales@poppedweb.com | https://poppedweb.com
TurnKey Website Design | Add-Ons | Performance Audits | Dedicated Server Management
24/7 Support | Response within an hour (during working hours).

 
  • andymike123
  • Advanced Member
  • Trial users
  • Join Date: 22-Feb 18
  • 65 posts

Posted 20 August 2019 - 09:06 PM #13

Since there were so many changes to the Imagine.php file, I went ahead and updated all of the files for imagine.  So far it has been running fine for most of the day.  I have attached the files.  Upload to the root of your installation and extract.

 

attachicon.gif Imagine_update.zip

 

Thank you so much for your help, hopefully CS-cart team see this. It is suck that CS-cart team let others to fix their problem