We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpPrograms › Re: Help with enlarging thumbnails.
Page Index Toggle Pages: 1
Re: Help with enlarging thumbnails. (Read 1082 times)
Re: Help with enlarging thumbnails.
Apr 18th, 2010, 4:37am
 
Take a look at the color picking technique.  Place a rect behind the image (in a color buffer), when you click the image send that info into your draw to expand the image selected.  Alternatively (and perhaps easier), you could determine the mouse position (mouseX, mouseY) the the mouseclick, then compare it to image positions and expand the appropriate image.

As far as I know, saveFrame only supports TIFF, TARGA, PNG, or JPEG.  There may be another Java library out there that would support gif, but that would be a bit more involved.
Re: Help with enlarging thumbnails.
Reply #1 - Apr 18th, 2010, 9:08am
 
Quote:
Is there any way I could export them as a .gif so that I could treat them the same way I do the .jpg images ?


Not sure what you mean since gif and jpeg use very different techniques to compress the image data.

I suspect that you are looking at image formats that can be used in web pages. If that is the case then use png instead of gif as they both are viewable on the web and both use lossless compression so you will see no difference in image quality.
Re: Help with enlarging thumbnails.
Reply #2 - Apr 18th, 2010, 10:06am
 
Yea basically since its an image gallery I'm wanting to use other sketches that I coded  and convert them into a png so that I can just use the Image() function rather than having to put all the code for the sketch into the gallery. I'm still very new to processing though so I'm not sure if its even possible. It just seems easier to use mouse event functions on a png file rather than trying to figure out how to integrate it into my code for the sketch.
Re: Help with enlarging thumbnails.
Reply #3 - Apr 18th, 2010, 8:56pm
 
Gah, still can't seem to get one to enlarge with out errors. Could some one possibly give me an example?
Re: Help with enlarging thumbnails.
Reply #4 - Apr 18th, 2010, 10:29pm
 
Duplicate with Enlarging a thumbnail image. Perhaps your problem is solved now
Please, avoid duplicates...
Page Index Toggle Pages: 1