Saving as multipage TIFF

Discussions on GFL SDK, the graphic library for reading and writing graphic files

Moderators: XnTriq, helmut, xnview

prasse

Saving as multipage TIFF

Post by prasse »

Hi, I want to know, how to save a couple of images into one TIFF file - using GflAx with VB or PHP. I know how to read images from multipages TIFF files. Thanks.
User avatar
xnview
Author of XnView
Posts: 44920
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Saving as multipage TIFF

Post by xnview »

prasse wrote:Hi, I want to know, how to save a couple of images into one TIFF file - using GflAx with VB or PHP. I know how to read images from multipages TIFF files. Thanks.
Only possible with libgfl.dll
Pierre.
Guest

Re: Saving as multipage TIFF

Post by Guest »

xnview wrote:
prasse wrote:Hi, I want to know, how to save a couple of images into one TIFF file - using GflAx with VB or PHP. I know how to read images from multipages TIFF files. Thanks.
Only possible with libgfl.dll
Can you please provide some sample code in C++ ? For example, if all images to be saved are stored in separate files.
User avatar
xnview
Author of XnView
Posts: 44920
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Saving as multipage TIFF

Post by xnview »

Anonymous wrote:
xnview wrote:
prasse wrote:Hi, I want to know, how to save a couple of images into one TIFF file - using GflAx with VB or PHP. I know how to read images from multipages TIFF files. Thanks.
Only possible with libgfl.dll
Can you please provide some sample code in C++ ? For example, if all images to be saved are stored in separate files.

Code: Select all

{
	GFL_LOAD_PARAMS load_option; 
	GFL_SAVE_PARAMS save_option; 
	GFL_FILE_INFORMATION file_info; 
	GFL_BITMAP *bitmap; 
	GFL_ERROR error; 
	GFL_HANDLE handle; 
	int i; 

	gflGetDefaultSaveParams( &save_option ); 
	save_option.FormatIndex = gflGetFormatIndexByName("tiff"); 
	error = gflFileCreate( &handle, dstfilename, count, &save_option ) )

	for ( i=0; i<count; i++ )
	{
		gflGetDefaultLoadParams( &load_option ); 
		error = gflLoadBitmap( filename[i], &bitmap, &load_option, &file_info ); 
		gflFileAddPicture( handle, bitmap ); 
		gflFreeBitmap( bitmap ); 
	}

	gflFileClose( handle ); 
}

Pierre.