Re: [gtk-list] Re: Displaying JPEGs



On 14 Feb, SAITO Jun scribbled:
->  Hi all.
->  
->  >On 13 Feb, Mike Lindahl scribbled:
->  >->  I am relatively new to GTK and am trying to get jpegs to display.  I am
->  >->  using the libjpeg library and that is not a problem.  I have successfully
->  >->  loaded the image into an array of memory.
->  >->
->  >->  My problem comes in trying to display it.  My first idea was to use
->  >->  successive calls to gdk_draw_point.  This works, however, it takes _way_
->  >->  too long.  Since I am running on an 8-bit display, I also have to allocate
->  >->  color entries (I am not entirely sure if I am doing this correctly,
->  >->  but...).
->  
->  I am stuck on a similar problem. That's why I joined this list ;)
->  I want to display an 8-bit gray scale image stored in an array,
->  Damn that slow color allocation, huh? As a last resort, I tried what
->  you did, and it was slow as hell :)
->  
->  
->  >there is a whole library designed just to do all of this:
->  >
->  >http://www.labs.redhat.com/imlib/
->  >
->  >save yourself a lot of work :)
->  
->  
->  It would be nice if you could specifically tell me which lines of
->  imlib code to look into. Reverse engineering is a time comsuming
->  process, you know :)
->  
->  Also, related to slow color allocation, how would you display many
->  lines of various colors as fast as possible?

I'm not saying read the code - just use the library nd save time.

there's a tutorial there.

-- 
--------------- Codito, ergo sum - "I code, therefore I am" --------------------
raster@rasterman.com       /\___ /\ ___/||\___ ____/|/\___  raster@redhat.com
Carsten Haitzler           | _ //__\\ __||_ __\\ ___|| _ /  Red Hat Advanced
218/21 Conner Drive        || // __ \\_ \ | |   \ _/_|| /   Development Labs
Chapel Hill NC 27514 USA   ||\\\/  \//__/ |_|   /___/||\\   919 547 0012 ext 282
+1 (919) 929 9443, 801 4392   For pure Enlightenment   http://www.rasterman.com/

              \|/ ____ \|/  For those of you unaware. This face here is in fact
	      "@'/ ,. \@"   a Linux Kernel Error Message.
	      /_| \__/ |_\
		 \__U_/
							   



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