libtiff

Extract a full-scale image from a SVS file

百般思念 提交于 2019-12-11 07:50:42
问题 I am trying to extract the first page of a SVS file using Libtiff. The SVS file uses JPEG2000 compression for this image. My plan is: extracting raw tiles from the first page of the SVS, and decoding it using OpenJPEG. Below is what I tried to extract raw tiles from the SVS. I only got a 43KB output file from 152MB svs file (it failed to extract the raw tiles). I hope someone could let me know how to extract tiles from a SVS file. int main() { const char* filename = "input.svs"; TIFF* tiff_in

building R: --with-libtiff not enabling TIFF capability

天大地大妈咪最大 提交于 2019-12-11 07:02:12
问题 Compiling R-3.3.2 from source. My flags include --with-libtiff . They are: ./configure --with-system-tre --with-blas --with-lapack --with-libtiff --enable-R-shlib --enable-lto --prefix=/opt/new.R I do have libtiff4 and libtiff4-dev . However: R is now configured for i686-pc-linux-gnu Source directory: . Installation directory: /opt/new.R C compiler: gcc -g -O2 Fortran 77 compiler: f95 -g -O2 C++ compiler: g++ -g -O2 C++11 compiler: g++ -std=c++11 -g -O2 Fortran 90/95 compiler: gfortran -g -O2

libtiff error: Old-style JPEG compression support is not configured

孤街醉人 提交于 2019-12-11 02:38:36
问题 While converting TIFF to BMP using libtiff on Mac OS X, I got these errors: scannerdata.tif: Old-style JPEG compression support is not configured. scannerdata.tif: Sorry, requested compression method is not configured. I am currently using libtiff in Mac OS X. My implementation of tiff to bmp: static void tifftobmp(char *colorMode){ DBG(1, ">> tifftobmp \n"); /* For files and file header */ char infile[PATH_MAX] = {0}; char outfile[PATH_MAX] = {0}; char tempfile[PATH_MAX] = {0}; TIFF *tifFile

libtiff4 error with ROS

谁说我不能喝 提交于 2019-12-10 18:43:55
问题 I am trying to compile a ROS-package from a friend with catkin under Ubuntu 14.04 and am getting the following error: /usr/bin/ld: warning: libboost_system.so.1.49.0, needed by //usr/local/MATLAB/R2014a/bin/glnxa64/libut.so, may conflict with libboost_system.so.1.54.0 //usr/local/lib/libcvd.so: undefined reference to `TIFFWriteEncodedStrip@LIBTIFF_4.0' //usr/local/lib/libcvd.so: undefined reference to `TIFFReadRGBAImageOriented@LIBTIFF_4.0' //usr/local/lib/libcvd.so: undefined reference to

Ubuntu 16.04 - Why I cannot install libtiff4-dev?

与世无争的帅哥 提交于 2019-12-10 13:06:31
问题 Following this tutorial, I am trying to install the OpenCV 3 with Python on Ubuntu 16.04. At the step of entering $ sudo apt-get install libjpeg8-dev libtiff4-dev libjasper-dev libpng12-dev I got this message: Reading package lists... Done Building dependency tree Reading state information... Done Package libtiff4-dev is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the

Writing 10,12 bit TIFF files with LibTIFF C++

99封情书 提交于 2019-12-08 15:09:33
问题 I'm trying to write 10,12 bit RGB TIFF files with LibTIFF. The pixel data is saved locally in an unsigned short buffer (16bits) 1) If I set TIFFTAG_BITSPERSAMPLE to 10 or 12, not enough bits are being read from the buffer, and the output is incorrect. (I understand that it is just reading 10 or 12 bits per component, instead of 16 and this is the problem) 2) I tried packing the bits in the buffer, so that it is really 12-R, 12-G, 12-B. In this case, I think the file is being written correctly

How to translate Tiff.ReadEncodedTile to elevation terrain matrix from height map in C#?

心不动则不痛 提交于 2019-12-08 03:30:32
问题 I'm new with working with reading tiff images and I'm trying to get the elevation terrain values from a tiff map by using LibTiff. The maps I need to decode are tile organized. Below the fragment of the code I'm using currently to get these values, based on the library documentation and research on the web: private void getBytes() { int numBytes = bitsPerSample / 8; //Number of bytes depending the tiff map int stride = numBytes * height; byte[] bufferTiff = new byte[stride * height]; // this

MATLAB write multipage tiff exponentially slow

£可爱£侵袭症+ 提交于 2019-12-07 07:30:38
问题 I am trying to write a single multipage tiff file which is 128 pixels x 128 pixels x 122000 frames of 16-bit unsigned integers. ImageJ or a short Python script can do this in less than one minute on a fast machine. On the same machine, MATLAB would likely take days to do so using any method I have tried. Here is what I have tried so far: Use imwrite to write IMG to test.tif (recommended by MATLAB documentation) tic numframes=size(IMG,3); divider=10^(floor(log10(numframes))-1); imwrite(IMG(:,:

Adding custom tags to a TIFF file

我们两清 提交于 2019-12-05 01:03:12
问题 I’m quite new to libtiff, but I’ve managed to get tiff files saving and opening without much trouble. Now, I’m being ambitious and trying to add custom tags into my files. I’ve read the documentation (see here) and written some test code which compiles without errors, but fails at runtime with an access violation at the first call to TIFFSetField that features a custom field (calls to TIFFSetField with standard fields are fine). My test code follows: just under 100 lines, with the only

How do I write a 1bpp tiff with libtiff on iOS?

女生的网名这么多〃 提交于 2019-12-04 14:33:09
问题 I'm trying to write a UIImage out as a tiff using libtiff. The problem is that even though I'm writing it as 1 bit per pixel, the files are still coming out in the 2-5MB range when I'm expecting something more like 100k or less. Here's what I've got. - (void) convertUIImage:(UIImage *)uiImage toTiff:(NSString *)file withThreshold:(float)threshold { TIFF *tiff; if ((tiff = TIFFOpen([file UTF8String], "w")) == NULL) { [[[UIAlertView alloc] initWithTitle:@"Error" message:[NSString