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 › Histogram & Linear Image
Page Index Toggle Pages: 1
Histogram & Linear Image (Read 757 times)
Histogram & Linear Image
Nov 17th, 2009, 8:51pm
 
Hi everybody, I'm a communication designer from Melbourne, Victoria and am experimenting with the color abilities of Processing as part of my self promotion/end of year piece.

Just wondering if i could grab some help in terms of customisation with these specific program codes;

-processing.org/learning/topics/linearimage.html

Is there any way I would be able to save each individual scanned section of the image, increase the resolution/size overall, change the angles/shape of the lines and export each section as a tiff/pdf. Perhaps it would be possible for the animation to stop at each scan thus allowing me to save/screengrab?

Also, on the histogram application, I seem to keep getting this error, most likely due to my novice abilities: 'Cannot find anything named hist' in reference to -     hist[int(red(get(i, j)))]++;

Thanks very much, any help would be greatly appreciated. Cheers.
Re: Histogram & Linear Image
Reply #1 - Nov 18th, 2009, 5:52am
 
hist[] is there in the source:

int[] hist = new int[width];

as for the other sketch:

yes to pretty much all of that.

the '200's in the source are width and height, change them to reflect any new image.

just put saveFrame("frame_####.png"); at the bottom of the draw loop to save each frame.

changing the angle of the line is tricker mainly because the line would end up spanning multiple vertical pixels for any other angle.
Re: Histogram & Linear Image
Reply #2 - Nov 22nd, 2009, 1:02am
 
koogy, thanks so much for your help, it worked a treat Smiley
Page Index Toggle Pages: 1