mirror of https://github.com/GNOME/gimp.git
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
This commit is contained in:
parent
e8b1a48ab5
commit
a6f377dd02
|
@ -1,3 +1,8 @@
|
|||
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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue