1 /* 2 * PTcommon.h 3 * 4 * Many of the routines are based on the program PTStitcher by Helmut 5 * Dersch. 6 * 7 * Copyright Helmut Dersch and Daniel M. German 8 * 9 * Dec 2006 10 * 11 * This program is free software; you can redistribute it and/or 12 * modify it under the terms of the GNU General Public 13 * License as published by the Free Software Foundation; either 14 * version 2 of the License, or (at your option) any later version. 15 * 16 * This software is distributed in the hope that it will be useful, 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 * General Public License for more details. 20 * 21 * You should have received a copy of the GNU General Public License 22 * along with this software; see the file COPYING. If not, a copy 23 * can be downloaded from http://www.gnu.org/licenses/gpl.html, or 24 * obtained by writing to the Free Software Foundation, Inc., 25 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 * 27 * 28 * Author: Daniel M German dmgerman at uvic doooot ca 29 * 30 */ 31 32 #ifndef __PTcommon_h__ 33 34 #define __PTcommon_h__ 35 36 #include "panorama.h" 37 #include "pt_stdint.h" 38 #include "file.h" 39 40 typedef struct { 41 uint16_t samplesPerPixel; 42 uint16_t bitsPerSample; 43 uint32_t imageLength; 44 uint32_t imageWidth; 45 int bytesPerLine; 46 int bitsPerPixel; 47 uint32_t rowsPerStrip; 48 uint16_t compression; 49 uint16_t predictor; 50 } pt_tiff_parms; 51 52 53 PANO13_IMPEX extern int ptQuietFlag; 54 55 PANO13_IMPEX int panoVerifyTiffsAreCompatible(fullPath *tiffFiles, int filesCount, int optionalCheck); 56 PANO13_IMPEX int panoAddStitchingMasks(fullPath *inputFiles, fullPath *outputFiles, int numberImages, int featherSize); 57 58 /* defined in ptpicker.c, but never exported */ 59 60 PANO13_IMPEX int panoFlattenTIFF(fullPath *fullPathImages, int counterImageFiles, fullPath *outputFileName, int removeOriginals); 61 62 extern int quietFlag; 63 64 PANO13_IMPEX int panoPSDCreate( fullPath *fullPathImages, int, fullPath*, pano_flattening_parms*); 65 PANO13_IMPEX int panoCreateLayeredPSD( fullPath *fullPathImages, int, fullPath*, pano_flattening_parms*); 66 67 PANO13_IMPEX int panoCreatePanorama(fullPath ptrImageFileNames[], int counterImageFiles, fullPath *panoFileName, fullPath *scriptFileName); 68 PANO13_IMPEX void ARGtoRGBAImage(Image *im); 69 PANO13_IMPEX void panoReplaceExt(char* filename, char *extension); 70 PANO13_IMPEX int panoUnCropTiff(char *inputFile, char *outputFile); 71 72 73 PANO13_IMPEX int StringtoFullPath(fullPath *path, char *filename); 74 PANO13_IMPEX void InsertFileName( fullPath *fp, char *fname ); 75 PANO13_IMPEX int ApplyFeather(fullPath * inputFile, fullPath * outputFile, 76 int featherSize); 77 78 /*****************/ 79 #define PANO_CROPPING_UNCROP 1 80 #define PANO_CROPPING_CROP 2 81 82 PANO13_IMPEX int panoCroppingMain(int argc,char *argv[], int operation, char *version,char *usage, char *defaultPrefix); 83 84 PANO13_IMPEX void panoPrintImage(char *msg, Image *im); 85 86 #ifndef min 87 #define min(a,b) ((a) <= (b) ? (a) : (b)) 88 #endif 89 90 #endif 91