Merge remote-tracking branch 'origin/7.28'
This commit is contained in:
commit
668bf1759b
@ -11,6 +11,7 @@
|
|||||||
- fix openslide read: always return png-style rgba, im_argb2rgba() becomes a
|
- fix openslide read: always return png-style rgba, im_argb2rgba() becomes a
|
||||||
NOP
|
NOP
|
||||||
- cast to unsigned int now removes <0 values
|
- cast to unsigned int now removes <0 values
|
||||||
|
- vips7 interface to openslide now supports :,level,associated options
|
||||||
|
|
||||||
13/3/12 started 7.28.2
|
13/3/12 started 7.28.2
|
||||||
- xres/yres tiffsave args were broken
|
- xres/yres tiffsave args were broken
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
*
|
*
|
||||||
* 17/12/11
|
* 17/12/11
|
||||||
* - just a stub
|
* - just a stub
|
||||||
|
* 11/4/12
|
||||||
|
* - support :level,associated in filenames
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -49,11 +51,28 @@
|
|||||||
#include <vips/internal.h>
|
#include <vips/internal.h>
|
||||||
|
|
||||||
static int
|
static int
|
||||||
im_openslide2vips( const char *filename, IMAGE *out )
|
im_openslide2vips( const char *name, IMAGE *out )
|
||||||
{
|
{
|
||||||
|
char filename[FILENAME_MAX];
|
||||||
|
char mode[FILENAME_MAX];
|
||||||
|
char *p, *q;
|
||||||
|
char *associated;
|
||||||
|
int level;
|
||||||
VipsImage *t;
|
VipsImage *t;
|
||||||
|
|
||||||
if( vips_openslideload( filename, &t, NULL ) )
|
im_filename_split( name, filename, mode );
|
||||||
|
level = 1;
|
||||||
|
associated = NULL;
|
||||||
|
p = &mode[0];
|
||||||
|
if( (q = im_getnextoption( &p )) )
|
||||||
|
level = atoi( q );
|
||||||
|
if( (q = im_getnextoption( &p )) )
|
||||||
|
associated = q;
|
||||||
|
|
||||||
|
if( vips_openslideload( filename, &t,
|
||||||
|
"level", level,
|
||||||
|
"associated", associated,
|
||||||
|
NULL ) )
|
||||||
return( -1 );
|
return( -1 );
|
||||||
if( vips_image_write( t, out ) ) {
|
if( vips_image_write( t, out ) ) {
|
||||||
g_object_unref( t );
|
g_object_unref( t );
|
||||||
|
12
python/try4.py
Executable file
12
python/try4.py
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
#!/usr/bin/python
|
||||||
|
|
||||||
|
import sys
|
||||||
|
from vips8 import vips
|
||||||
|
from gi.repository import Vips
|
||||||
|
|
||||||
|
a = vips.Image(sys.argv[1])
|
||||||
|
b = vips.Image(sys.argv[2])
|
||||||
|
|
||||||
|
c = a.join(b, Vips.Direction.HORIZONTAL, expand = True)
|
||||||
|
|
||||||
|
c.write_to_file(sys.argv[3])
|
Loading…
Reference in New Issue
Block a user