IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
Post Reply
Posts: 1
Joined: 2018-02-26T01:23:56-07:00
Authentication code: 1152


Post by Puplip » 2018-02-26T01:35:04-07:00

For example, to add a gradient to a button I have to use ImageMagick to calculate the size of the button, write that size to a text file, then read that text file later.

Can this be done with IMagick?
trị mụn bằng tỏi và nghệ có tác dụng như thế nào
Last edited by Puplip on 2018-06-06T19:17:28-07:00, edited 2 times in total.

User avatar
Posts: 25668
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA


Post by fmw42 » 2018-02-26T10:36:57-07:00

You do not need to write the size to a text file. You can store that in a variable. In Unix, this would be

dimensions=$(convert image -format "%wx%h" info:)

You can also create gradients inline with sparse-color. See ... _gradients

Sorry, I do not know Imagick.

If you post your current Imagemagick code, perhaps we can suggest more efficient ways to do that.

But please always provide your Imagemagick version and platform/OS

Post Reply