fix png save
This commit is contained in:
parent
71d55c4554
commit
07cf2be29e
11
TODO
11
TODO
@ -9,9 +9,7 @@
|
||||
`gdouble' is invalid or out of range for property `yres' of
|
||||
type `gdouble'
|
||||
|
||||
- png save from nip2 often makes bad pngs?
|
||||
|
||||
and clicking on one of those bad pngs in the file browser will lock nip2
|
||||
- clicking on bad pngs in the file browser will lock nip2
|
||||
|
||||
they don't seem to bother "header" though, strange
|
||||
|
||||
@ -44,6 +42,13 @@
|
||||
|
||||
total of about 0.5s user time difference
|
||||
|
||||
... tile size difference!
|
||||
|
||||
try
|
||||
|
||||
time ./vips.py wtc_tiled_small.tif x.tif --vips-tile-width=512
|
||||
--vips-tile-height=512
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -513,13 +513,19 @@ typedef struct {
|
||||
} Write;
|
||||
|
||||
static void
|
||||
write_destroy( VipsImage *out, Write *write )
|
||||
write_finish( Write *write )
|
||||
{
|
||||
VIPS_FREEF( fclose, write->fp );
|
||||
if( write->pPng )
|
||||
png_destroy_write_struct( &write->pPng, &write->pInfo );
|
||||
}
|
||||
|
||||
static void
|
||||
write_destroy( VipsImage *out, Write *write )
|
||||
{
|
||||
write_finish( write );
|
||||
}
|
||||
|
||||
static Write *
|
||||
write_new( VipsImage *in )
|
||||
{
|
||||
@ -690,6 +696,8 @@ vips__png_write( VipsImage *in, const char *filename,
|
||||
return( -1 );
|
||||
}
|
||||
|
||||
write_finish( write );
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user