Esempio n. 1
0
int main()
{
	char *fname = "newgeo.tif";
	TIFF *tif=(TIFF*)0;  /* TIFF-level descriptor */
	GTIF *gtif=(GTIF*)0; /* GeoKey-level descriptor */
	
	tif=XTIFFOpen(fname,"w");
	if (!tif) goto failure;
	
	gtif = GTIFNew(tif);
	if (!gtif)
	{
		printf("failed in GTIFNew\n");
		goto failure;
	}
	
	SetUpTIFFDirectory(tif);
	SetUpGeoKeys(gtif);
	WriteImage(tif);
	
	GTIFWriteKeys(gtif);
	GTIFFree(gtif);
	XTIFFClose(tif);
	return 0;
	
failure:
	printf("failure in makegeo\n");
	if (tif) TIFFClose(tif);
	if (gtif) GTIFFree(gtif);
	return -1;
}
Esempio n. 2
0
void main()
{
	TIFF *tif=(TIFF*)0;  /* TIFF-level descriptor */
	
	tif=XTIFFOpen("newtif.tif","w");
	if (!tif) goto failure;
	
	SetUpTIFFDirectory(tif);
	WriteImage(tif);
	
	XTIFFClose(tif);
	exit (0);
	
failure:
	printf("failure in maketif\n");
	if (tif) XTIFFClose(tif);
	exit (-1);
}