tiff

Tiff versus BigTiff

安稳与你 提交于 2019-12-11 05:23:36
问题 Please let me know if there is another Stack Exchange community this question would be better suited for. I am trying to understand the basic differences between Tiff and BigTiff. I have looked on various sites and the only difference that is mentioned is that BigTiff uses 64-bit offsets while Tiff uses 32-bit offsets. That being said, you would need to know which of the two types you are reading. How is this done? According to https://www.leadtools.com/help/leadtools/v19/main/api/tifffmt

JAI: How to convert 4-band 32-bits CMYK image into PNG?

拟墨画扇 提交于 2019-12-11 04:48:32
问题 I'm trying to convert a image into PNG format, the data I have is a 4-band 32-bits TIFF-like image compressed by LZW. By using Java2D and JAI now I have data uncompressed to represent colors in CMYK space and it can be exported and viewed when stored in tiff with the same settings as 4 band 32-bit format. The problem is when I try converting to other formats like PNG it produce zero-sized data, so I'd like to ask is there anyone have similar experience on converting such image? I have some of

Convert tiff (I;16) to JPG with PIL/pillow

本小妞迷上赌 提交于 2019-12-11 04:27:08
问题 I have a problem converting a tiff image from a microscope to a jpeg, which should be shown within a web application. I tried the following: image = Image.open(file_name) image.convert(mode="RGB") image.save('my.jpeg') >>IOError: cannot write mode I;16 as JPEG Anybody has some experience in converting 16-bit TIFF files to jpegs... I have linked such a file below. Thanks for your help! https://drive.google.com/open?id=0B04N02JqhWJOWjBPY1RRZkIwbTg 回答1: It's either a bug or unimplemented in PIL

UIimage to char* conversion

岁酱吖の 提交于 2019-12-11 03:55:00
问题 I am trying to convert uiimage to char array to use with libtiff. Thanks 回答1: Here is the easiest way that I know of to get the bytes of a UIImage: UIImage *someImage = ...; CFDataRef pixelData = CGDataProviderCopyData(CGImageGetDataProvider(someImage.CGImage)); const UInt8 *data = CFDataGetBytePtr(pixelData); Data then is an array of bytes. EDIT: Here is how you get an char array: const unsigned char * buffer = CFDataGetBytePtr(pixelData); EDIT 2: Try casting it to char: char * buffer =

Convert Tiff data type in libTiff to nsdata ios

笑着哭i 提交于 2019-12-11 03:16:00
问题 I am using libtiff to create tif images. Can any one help how to convert TIFF back to nsdata. Thanks 回答1: Conveniently, CFData is toll-free bridged with NSData, so you can basically turn it directly into an NSData object without doing anything. Just replace the line CFRelease(pixelData); With NSData *tiffData = CFBridgingRelease(pixelData); And that's your tiffData as an autoreleased NSData object, ready to use as you wish. 回答2: Thanks for help by the community. I figured out the answer. Just

How to make a tiff z-stack conserving or adding metadata?

孤街浪徒 提交于 2019-12-11 02:53:54
问题 I have a number of tiff files that I would like to combine to a z-stack using python. The individual files have metadata that I would like to conserve (OME in my case), in particular the information on which z slice it is. Alternatively, I would like to insert somewhere in the z-stack's metadata that it is a z-stack (and not e.g. a time-lapse. I need this for opening the stacks correctly with Bioformats in ImageJ). I can make a z-stack using e.g. tifffile.py, reading the individual files like

Edit multipage TIFF image using System.Drawing

你离开我真会死。 提交于 2019-12-11 02:52:18
问题 I'm tring to edit multipage tiff by creating Graphics from the image, but i encountered the error message: “A Graphics object cannot be created from an image that has an indexed pixel format.” How can i edit multipage tiff? 回答1: The error : A Graphics object cannot be created from an image that has an indexed pixel format. ...has nothing to do with it being a multipage TIFF. An indexed image format means it has a palette of colours, e.g. it's a 256-colour image. A 1-bit image (B&W) would also

Adding 8BIM profile metadata to a tiff image file

梦想与她 提交于 2019-12-11 02:48:25
问题 I'm working on a program which requires 8BIM profile information to be present in the tiff file for the processing to continue. The sample tiff file (which does not contain the 8BIM profile information) when opened and saved in Adobe Photoshop gets this metadata information. I'm clueless as to how to approach this problem. The target framework is .net 2.0. Any information related to this would be helpful. 回答1: No idea why you need the 8BIM to be present in your TIFF file. I will just give

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

How to change the resolution of .tif raster file without losing data

青春壹個敷衍的年華 提交于 2019-12-11 01:26:24
问题 For example, A .tiff file of 400*200 size, I can read it as a 2-D array(400 x 200) in python. I want to change the tiff size to 200 x 100 or other ratio. How to realize that in Python or GIS software(QGIS, ArcGIS et.al). I know the resemble tool in ArcGIS can change the size of raster data. but the length-width ratio is fixed. Example Diagram: (source: tietuku.com) 回答1: With R you can do things like library(raster) r <- raster('file.tif') a <- aggregate(r, c(2,3)) 来源: https://stackoverflow