Hi Robert,

 

Thanks for the info. I forgot about @URL and didn't realize it would work
for this. I ended up downloading the image, getting the info I needed (and
creating the thumbnail if necessary) and then deleting the downloaded image.
Works great.

 

Thanks

 

Steve

 

  _____  

From: Robert Garcia [mailto:[email protected]] 
Sent: Tuesday, September 01, 2009 5:00 PM
To: [email protected]
Subject: Re: Witango-Talk: Offsite images for Witango Auction site (A bit
off topic)

 

You should be able to download an image into a file using @URL in witango.
You could then do anything with IM. You can also use tools like wget or curl
to grab the image.

 

As far as determining the size of a remote image, aside from searching and
finding some cool tool that does just that, I can tell you how I would
approach a custom solution if I couldn't find a tool.

 

1. Create a function in witango to read the URL, save to a file, use IM to
get info from the image and parse back in.

 

2. If witango doesn't work, create a batch or bash script to do the same,
but use wget or curl to grab the image first, instead of witango.

 

3. I used to use RealBasic for a lot of stuff like this, this would be quick
and easy. Use my RB framework to create a witango helper, it would take a
URL in as a ENV VAR and get the image as a string and turn into an image
object and read in width and height and return.

 

-- 

 

Robert Garcia

President - BigHead Technology

VP Application Development - eventpix.com

13653 West Park Dr

Magalia, Ca 95954

ph: 530.645.4040 x222 fax: 530.645.4040

[email protected] <mailto:[email protected]>  - [email protected]
<mailto:[email protected]> 

http://bighead.net/ <http://bighead.net/>  - http://eventpix.com/
<http://eventpix.com/> 

 

On Sep 1, 2009, at 2:42 PM, Fogelson, Steve wrote:





Hi Robert,

 

Thanks for the response. I do this as well on images resident on the Witango
server. In fact, I think I got the basics from you about 4 to 5 years ago.
Works great.

 

What I don't know how to handle is off site images.

 

When a seller enters the url to an image (resident on an offsite image
server), I would like to be able to download it to my server and then resize
it using imagemagick. The resizing part I understand. The downloading using
an url, I don't.

 

Also, I only create a thumbnail for the first image, so subsequent offsite
images are referenced with a url when we display them for an auction item. I
want to limit the display for each image to 250 pixels as some of the off
site images may be larger than that. I can accomplish that with the width
attribute in the scr tag. The problem is when the width is smaller than 250
pixels. If I set the width attribute to 250, it will distort the image.

 

So I would like to be able to somehow determine the width of the offsite
image referenced by an url on the fly and adjust the width attribute
accordingly. I don't know if this is possible.

 

Thanks for your comments.

 

Steve

 

  _____  

From: Robert Garcia [mailto:[email protected] <mailto:[email protected]>
] 
Sent: Monday, August 31, 2009 12:10 PM
To: [email protected] <mailto:[email protected]> 
Subject: Re: Witango-Talk: Offsite images for Witango Auction site (A bit
off topic)

 

It is possible using external actions and imagemagick. We did this kind of
stuff all the time for eventpix.

 

-- 

 

Robert Garcia

President - BigHead Technology

VP Application Development - eventpix.com

13653 West Park Dr

Magalia, Ca 95954

ph: 530.645.4040 x222 fax: 530.645.4040

[email protected] <mailto:[email protected]>  - [email protected]
<mailto:[email protected]> 

http://bighead.net/ <http://bighead.net/>  - http://eventpix.com/
<http://eventpix.com/> 

 

On Aug 31, 2009, at 8:00 AM, Fogelson, Steve wrote:






I have a customer with a Witango "Auction" site. They want the ability for
seller to reference images from other sites or image servers.

 

So we don't actually download the image to our Witango server. I need to be
able to do 2 things.

 

1)     Create a thumbnail of the offsite image. I would like the thumbnail
stored on our server if possible.

2)     Figure out the width and height of the offsite image on the fly. I
want to resize if necessary.

 

Is this possible? Please provide suggestions how I can do this.

 

Steve Fogelson

Internet Commerce Solutions

"In God We Trust"

 

________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
<http://www.witango.com/developer/maillist.taf> 

 

________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
<http://www.witango.com/developer/maillist.taf> 
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
<http://www.witango.com/developer/maillist.taf> 

 



________________________________________________________________________

TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Reply via email to