Display Portions of an Image



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

I'm working on a Gtk-perl app which would display only a portion of an image.
I seem to be having trouble coming up with a good methodology for handling
this.

My goal is to create a Wanda the Fish like application for Gavin's PerlPanel.
Why?  Well, because I can :-)  (well, actually not I guess, but that's what I
hope to solve with this email)

So, I'll have an image, lets say a png, with 3 or so frames across it, each
frame being a new pose for the fish.  Displaying one frame after another would
then give the impression of an animation.  Taking the full length of the png,
and dividing that by 3, would give us the size of each individual frame.

I looked into gdk_pixbuf_copy_area, which almost seemed like it might do the
trick, except that it requires an existing pixbuf to put the copy into. Well, I
don't have an existing pixbuf, I only have one image, the one I'm trying to
copy from.  Is it somehow posible to pass in a blank/empty pixbuf to put the
copy onto?  Is there a better way to go about doing this altogether? Lastly,
would it be silly to suggest that perhaps gdk_pixbuf_copy_area could return a
new pixbuf with the copy on it if a destination pixbuf isn't passed in?

I did try looking at the GNOME panel's fish applet to see how they did things.
Being new to GTK, and not incredibly familar with C, I didn't quite follow what
was going on :-)

Any thoughts would be great.  Thanks!
  -Eric

- -- 
 Eric Andreychek              | Lucy: "What happens if you practice the
 Eric Conspiracy Secret Labs  |  piano for 20 years and then end up not
 eric openthought net         |  being rich and famous?"
 http://openthought.net       | Schroeder: "The joy is in the playing."
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE/Hp+6R5UKaDAjAG4RAn8ZAKDLlklsEgEZLx7zMG0uuFit2buQDQCg44Xk
kOJhhuBz7ONvCPd20NDsG+s=
=rXhb
-----END PGP SIGNATURE-----



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]