Re: JPEG image scaling
- From: Michael L Torrie <torriem chem byu edu>
- To: GBanschbach sandata com
- Cc: gtk-list gnome org
- Subject: Re: JPEG image scaling
- Date: Wed, 12 Dec 2007 10:13:34 -0700
GBanschbach sandata com wrote:
> Are you successfully getting it loaded? How big is the picture before
> you scale? I need example code ( even though it does not scale ) of how
> to do this. It can be "skeleton code".... you know, like we don't need to
> see the proprietary stuff, just the window/panel setup, the core stuff. I
> have heard that displaying an image uses the same techniques to display a
> movie.
Please keep replies on the list.
I'm not sure what you mean by "successfully getting it loaded." I've
loaded and scaled JPEGs in GdkPixbuf on many occasions. It's just
standard API stuff.
http://developer.gnome.org/doc/books/WGA/graphics-gdk-pixbuf.html
>
>
> MY GOAL: Play a movie in a panel or hbox or whatever, similar to a
> kiosk. For example: A person at a big shopping mall presses the button
> to give them directions to the food stands/restaurants. It plays a movie
> showing the route from where they are. At this point, it would be great
> if I could play a dvd, but I will take any type to get started. 8-)
What you should be looking at is gstreamer. the gstreamer api not only
takes care of decoding the streams (mpeg, dvd, etc), it also has
facilities for displaying the resulting video in a GTK window, or any X
window for that matter.
I searched google for "gstreamer video in gtk window" and got this
python code snippet, which is pretty easy to follow and apply to
whatever language you are using:
http://www.david-web.co.uk/blog/?p=166
>
> THANKS.
>
>
>
>
>
> Michael L Torrie
> <torriem chem byu
> .edu> To
> Sent by: Jian Zhang
> <gtk-list-bounces <jian zhang broadcom com>
> @gnome.org> cc
> <gtk-list gnome org>
> Subject
> 12/11/2007 11:17 Re: JPEG image scaling
> AM
>
>
>
>
>
>
>
>
>
> Jian Zhang wrote:
>> Hi,
>>
>> I'm trying to show an input jpeg file on a fixed area (for example an
>> area of 320x320 pixels) on my LCD. What's the best way to scale it using
>> gtk? I mean is there any api function that I can use?
>
> Check out the API docs for GdkPixbuf. Basically you can load the jpeg
> into a Pixbuf, then scale it to an arbitrary size into a new GdkPixbuf
> object. You can then throw the original away if you want, and paint
> this newly scaled pixbuf to the window, often a GtkDrawingArea.
>
>> Thanks,
>> jian
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> gtk-list mailing list
>> gtk-list gnome org
>> http://mail.gnome.org/mailman/listinfo/gtk-list
>
>
> --
> Michael Torrie
> Assistant CSR, System Administrator
> Chemistry and Biochemistry Department
> Brigham Young University
> Provo, UT 84602
> +1.801.422.5771
>
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list
>
>
--
Michael Torrie
Assistant CSR, System Administrator
Chemistry and Biochemistry Department
Brigham Young University
Provo, UT 84602
+1.801.422.5771
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]