MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Getting pixel values from individual frames in an animated gif?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg81552] Re: Getting pixel values from individual frames in an animated gif?
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Wed, 26 Sep 2007 21:50:15 -0400 (EDT)
  • Organization: Uni Leipzig
  • References: <fdddaq$92v$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de

Hi,

the palette is hidden in the ColorFunction option.
Extracting the color function with
cfunlist=ColorFunction /.
    Union[Cases[mygraphiclist,Verbatim[Rule,ColorFunction,_],Infinity]]]

should give you the list of color functions and
#[index] & /@ cfunlist

the RGB values.

Regards
   Jens


W. Craig Carter wrote:
> Hello, I'd like to get the values of index pixels from an 
> animated gif.
> 
> mygraphiclist = Import["animated.gif"]
> gives me a list of graphics objects.
> 
> I'm looking for the rgb values.
> 
> data[frame_] = mygraphicslist[frame_,1,2,1,1] gives me
> the correct dimensions for an individual frame, i.e.,
> Dimensions[data[12]] is the image size.
> 
> I can't seem to find the rgb values, i.e.,
> data[12][[12,25]] is an integer, but is this an index to a 
> map, or a 0-255 for R,G, or B?
> 
> 
> W. Craig Carter
> Professor of Materials Science and Engineering
> MIT, Dept. of Materials Science and Engineering 13-5018  77 Massachusetts Ave, Cambridge, MA 02139-4307 USA
> 617-253-6048  ccarter at mit.edu http://pruffle.mit.edu/~ccarter http://pruffle.mit.edu/~ccarter/FAQS/ http://pruffle.mit.edu/~ccarter/I_do_not_use_microsoft.html
> 


  • Prev by Date: Re: Good Introductory Text with a Physics Slant
  • Next by Date: Re: Re: Any Mathematica 6 book yet?
  • Previous by thread: Getting pixel values from individual frames in an animated gif?
  • Next by thread: Question about InputField