HELP

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
Puplip
Posts: 1
Joined: 2018-02-26T01:23:56-07:00
Authentication code: 1152

HELP

Post by Puplip »

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
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: HELP

Post by fmw42 »

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 https://www.imagemagick.org/Usage/canva ... _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