make im_tiff2vips,c into a stub
This commit is contained in:
parent
4367ccb177
commit
a7a3865375
2
TODO
2
TODO
@ -16,8 +16,6 @@
|
||||
|
||||
|
||||
|
||||
- make im_tiff2vips.c into a stub
|
||||
|
||||
- what should we do?
|
||||
|
||||
vips_image_new_from_file( "x.tif[page=12]" );
|
||||
|
@ -1552,3 +1552,15 @@ vips__istifftiled( const char *filename )
|
||||
return( tiled );
|
||||
}
|
||||
|
||||
gboolean
|
||||
vips__istiff( const char *filename )
|
||||
{
|
||||
unsigned char buf[2];
|
||||
|
||||
if( vips__get_bytes( filename, buf, 2 ) )
|
||||
if( (buf[0] == 'M' && buf[1] == 'M') ||
|
||||
(buf[0] == 'I' && buf[1] == 'I') )
|
||||
return( TRUE );
|
||||
|
||||
return( FALSE );
|
||||
}
|
||||
|
@ -67,19 +67,6 @@ typedef VipsForeignLoadClass VipsForeignLoadTiffClass;
|
||||
G_DEFINE_TYPE( VipsForeignLoadTiff, vips_foreign_load_tiff,
|
||||
VIPS_TYPE_FOREIGN_LOAD );
|
||||
|
||||
static gboolean
|
||||
vips_foreign_load_tiff_is_a( const char *filename )
|
||||
{
|
||||
unsigned char buf[2];
|
||||
|
||||
if( vips__get_bytes( filename, buf, 2 ) )
|
||||
if( (buf[0] == 'M' && buf[1] == 'M') ||
|
||||
(buf[0] == 'I' && buf[1] == 'I') )
|
||||
return( TRUE );
|
||||
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
/* TIFF flags function.
|
||||
*/
|
||||
static VipsForeignFlags
|
||||
@ -135,7 +122,7 @@ vips_foreign_load_tiff_class_init( VipsForeignLoadTiffClass *class )
|
||||
|
||||
foreign_class->suffs = tiff_suffs;
|
||||
|
||||
load_class->is_a = vips_foreign_load_tiff_is_a;
|
||||
load_class->is_a = vips__istiff;
|
||||
load_class->get_flags = vips_foreign_load_tiff_get_flags;
|
||||
load_class->header = vips_foreign_load_tiff_header;
|
||||
load_class->load = vips_foreign_load_tiff_load;
|
||||
|
@ -83,10 +83,8 @@
|
||||
|
||||
#include <vips/vips.h>
|
||||
|
||||
/* Read a JPEG file into a VIPS image.
|
||||
*/
|
||||
static int
|
||||
jpeg2vips( const char *name, IMAGE *out, gboolean header_only )
|
||||
int
|
||||
im_jpeg2vips( const char *name, IMAGE *out )
|
||||
{
|
||||
char filename[FILENAME_MAX];
|
||||
char mode[FILENAME_MAX];
|
||||
@ -135,12 +133,6 @@ jpeg2vips( const char *name, IMAGE *out, gboolean header_only )
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
int
|
||||
im_jpeg2vips( const char *filename, IMAGE *out )
|
||||
{
|
||||
return( jpeg2vips( filename, out, FALSE ) );
|
||||
}
|
||||
|
||||
int
|
||||
im_bufjpeg2vips( void *buf, size_t len, IMAGE *out, gboolean header_only )
|
||||
{
|
||||
@ -150,7 +142,7 @@ im_bufjpeg2vips( void *buf, size_t len, IMAGE *out, gboolean header_only )
|
||||
* pixel access.
|
||||
*/
|
||||
|
||||
if( vips_call( "jpegload_buffer", buf, len, &t, NULL ) )
|
||||
if( vips_jpegload_buffer( buf, len, &t, NULL ) )
|
||||
return( -1 );
|
||||
if( vips_image_write( t, out ) ) {
|
||||
g_object_unref( t );
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -298,6 +298,8 @@ typedef enum {
|
||||
VIPS_FOREIGN_TIFF_RESUNIT_LAST
|
||||
} VipsForeignTiffResunit;
|
||||
|
||||
int vips_tiffload( const char *filename, VipsImage **out, ... )
|
||||
__attribute__((sentinel));
|
||||
int vips_tiffsave( VipsImage *in, const char *filename, ... )
|
||||
__attribute__((sentinel));
|
||||
|
||||
|
@ -299,6 +299,9 @@ size_t vips__parse_size( const char *size_string );
|
||||
IMAGE *vips__deprecated_open_read( const char *filename );
|
||||
IMAGE *vips__deprecated_open_write( const char *filename );
|
||||
|
||||
gboolean vips__istiff( const char *filename );
|
||||
gboolean vips__istifftiled( const char *filename );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /*__cplusplus*/
|
||||
|
Loading…
Reference in New Issue
Block a user