[SOLVED] Classic ASP: Can IM load from a binary variable?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
jbc
Posts: 2
Joined: 2011-01-03T16:27:38-07:00
Authentication code: 8675308

[SOLVED] Classic ASP: Can IM load from a binary variable?

Post by jbc »

Hi,

I am successfully using IM with classic asp with outstanding results.

Now, I would like to pass an image to IM in the form of a variable/object instead of a file name.

For example, instead of this: convert rose.jpg rose.png

Can I do this somehow?

1. get a remote image via http [this is done by my script]
2. assign image binary to mybinaryvariable [this is done by my script]
3. convert mybinaryvariable rose.png [not sure how to do this!]

In general I would like to apply the convert command without having to write the image file to disk first.

Many thanks,

JBC
Last edited by jbc on 2011-01-03T17:32:36-07:00, edited 1 time in total.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Classic ASP: Can IM load from a binary variable?

Post by fmw42 »

jbc
Posts: 2
Joined: 2011-01-03T16:27:38-07:00
Authentication code: 8675308

Re: Classic ASP: Can IM load from a binary variable?

Post by jbc »

Works perfectly, thanks!

For other folks with this question, I did it this way:

Set objIM = Server.CreateObject("ImageMagickObject.MagickImage.1")
strOutput = objIM.Convert("http://www.somewebsite.com/someimage.jp ... eimage.jpg")
Response.Write strOutput
Set objIM = Nothing

JBC
Post Reply