Merge remote-tracking branch 'origin/master' into colour

This commit is contained in:
John Cupitt 2012-05-17 21:36:12 +01:00
commit 1f69943639
5 changed files with 19 additions and 27 deletions

View File

@ -5,6 +5,9 @@
rounding down (thanks Nicolas)
- add dzsave, save in deep zoom format
19/4/12 started 7.28.6
- better resolution unit handling in deprecated im_vips2tiff()
19/4/12 started 7.28.5
- ifthenelse blend mode was broken
- small blend speedup

10
TODO
View File

@ -83,18 +83,8 @@ foreign
ppm.c
radiance.c
- is the tif reader deadlocking sometimes?
is it when we get a non-seq error?
should there be some way to set the seq cache size?
- foreign docs come up as "VipsForeignSave", annoying, why?
- make an argb coding type, add to nip2 and known coding
see openslide
- add nifti support
http://niftilib.sourceforge.net/

View File

@ -228,8 +228,7 @@ im_text( IMAGE *out, const char *text, const char *font,
pango_ft2_font_map_set_resolution( PANGO_FT2_FONT_MAP( fontmap ),
dpi, dpi );
context = pango_ft2_font_map_create_context(
PANGO_FT2_FONT_MAP( fontmap ) );
context = pango_font_map_create_context( PANGO_FONT_MAP( fontmap ) );
if( text_render_to_image( context, out, text, font,
width, alignment, dpi ) ) {

View File

@ -178,20 +178,10 @@ im_vips2tiff( IMAGE *in, const char *filename )
}
if( (q = im_getnextoption( &p )) ) {
if( im_isprefix( "res_cm", q ) ) {
if( resunit == VIPS_FOREIGN_TIFF_RESUNIT_INCH ) {
xres /= 2.54;
yres /= 2.54;
}
if( im_isprefix( "res_cm", q ) )
resunit = VIPS_FOREIGN_TIFF_RESUNIT_CM;
}
else if( im_isprefix( "res_inch", q ) ) {
if( resunit == VIPS_FOREIGN_TIFF_RESUNIT_CM ) {
xres *= 2.54;
yres *= 2.54;
}
else if( im_isprefix( "res_inch", q ) )
resunit = VIPS_FOREIGN_TIFF_RESUNIT_INCH;
}
else {
im_error( "im_vips2tiff", _( "unknown resolution unit "
"\"%s\"\nshould be one of \"res_cm\" or "
@ -209,6 +199,15 @@ im_vips2tiff( IMAGE *in, const char *filename )
yres = xres;
}
/* vips resolutions are always in pixels/mm. If the
* user specifies ",res_inch:72x72" then they are
* using pixels/inch instead and we must convert.
*/
if( resunit == VIPS_FOREIGN_TIFF_RESUNIT_INCH ) {
xres /= 2.54;
yres /= 2.54;
}
}
}

View File

@ -1717,9 +1717,9 @@ vips_tiffload( const char *filename, VipsImage **out, ... )
* @tile_height; set tile size
* @pyramid; set %TRUE to write an image pyramid
* @squash; squash 8-bit images down to 1 bit
* @resunit; use pixels per inch or cm for the resolution
* @xres; horizontal resolution
* @yres; vertical resolution
* @resunit; convert resolution to pixels per inch or cm during write
* @xres; horizontal resolution in pixels/mm
* @yres; vertical resolution in pixels/mm
* @bigtiff; write a BigTiff file
*
* Write a VIPS image to a file as TIFF.
@ -1769,6 +1769,7 @@ vips_tiffload( const char *filename, VipsImage **out, ... )
*
* Use @xres and @yres to override the default horizontal and vertical
* resolutions. By default these values are taken from the VIPS image header.
* libvips resolution is always in pixels per millimetre.
*
* Set @bigtiff to attempt to write a bigtiff.
* Bigtiff is a variant of the TIFF