Commit a6f377dd authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

use a tile cache to optimize pixel access.

2008-12-17  Sven Neumann  <sven@gimp.org>

	* plug-ins/common/file-png.c (load_image) (save_image): use a 
tile
	cache to optimize pixel access.


svn path=/trunk/; revision=27805
parent e8b1a48a
2008-12-17 Sven Neumann <sven@gimp.org>
* plug-ins/common/file-png.c (load_image) (save_image): use a tile
cache to optimize pixel access.
2008-12-16 Sven Neumann <sven@gimp.org>
* tools/pdbgen/pdb/plug_in.pdb: improved docs for
......
......@@ -977,6 +977,8 @@ load_image (const gchar *filename,
for (i = 0; i < tile_height; i++)
pixels[i] = pixel + info->width * info->channels * i;
gimp_tile_cache_ntiles (1 + drawable->width / gimp_tile_width ());
/* Install our own error handler to handle incomplete PNG files better */
error_data.drawable = drawable;
error_data.pixel = pixel;
......@@ -1487,6 +1489,8 @@ save_image (const gchar *filename,
pixel = g_new (guchar, tile_height * drawable->width * bpp);
pixels = g_new (guchar *, tile_height);
gimp_tile_cache_ntiles (1 + drawable->width / gimp_tile_width ());
for (i = 0; i < tile_height; i++)
pixels[i] = pixel + drawable->width * bpp * i;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment