tiff

Larger than expected file sizes when saving a TIFF with OpenCV

醉酒当歌 提交于 2020-07-23 06:31:28
问题 I am creating a python program to load a .tiff image, crop out a selection from the image, and save the selection as a tiff. The dataset images are large, exceeding 1GB. I can successfully crop out what I need and save as a tiff, but the new image file sizes are much larger than what I expect and need. Opening I am using tifffile to open the image as a numpy array. OpenCV and PIL were not able to open the files due to size. I tried using OpenSlide as well, but encountered other problems down

how to import tif calibration into DM

那年仲夏 提交于 2020-06-28 09:18:18
问题 We need to treat the SEM images from FEI and Zeiss tools in DigitalMicrograph. They are stored as tif. DigitalMicrograph can read 2D tif but images appear uncalibrated in X,Y directions. Is there any import plugIn that transfers the calibration information ? Alternatively, I can imagine that the calibration can be red directly from a stream. Has anyone a clear idea about the offset where such numbers are stored in a stream of tif? I am not very familiar with organization of tif and I know

Is there a way to set specific compression scheme when saving tiff file in opencv?

。_饼干妹妹 提交于 2020-06-26 07:19:17
问题 I'm using opencv to crop tif files, everthing is fine, except for saving image to a file - opencv always uses LZW compression, but i don't need compression on resulting files, i do appreciate opencv's help in saving my disk drive space, but now is not the right time to do it. So is there a way to save tif files with specific compression scheme (including no compression) or no? Original images have no compression scheme applied and i'm using ROI to select area and SaveImage to save it to the

Save Matplotlib figure as TIFF

眉间皱痕 提交于 2020-05-24 20:20:26
问题 Does anyone know how to save a Matplotlib figure as *.tiff? It seems that this format is not supported in Python, while the journals are quite often ask for that format. I am adding some minimal code: # -*- coding: utf-8 -*- from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt import numpy as np # fig setup fig = plt.figure(figsize=(5,5), dpi=300) ax = fig.gca(projection='3d') ax.set_xlim([-1,1]) ax.set_ylim([-1,1]) ax.set_zlim([-1,1]) ax.axes.xaxis.set_ticklabels([]) ax

Ghostscript: how to decide the output resolution of converting a multi-page PDF to multiple TIFFs

狂风中的少年 提交于 2020-05-11 07:33:07
问题 I need to extract TIFF images from a bunch of multi-page PDF files from a scanner. During the scanning I specified a resolution of 600dpi. Here is the code I used to generate TIFF images: gs -q -dNOPAUSE -sDEVICE=tiffg4 \ -sOutputFile=a_page%02d.tif a.pdf -r600x600 -c quit This gave me the correct number of TIFF images, however, the image dimension is smaller than I expected. No matter how I change the -r option, the output images have the same size. What happened here? The output TIFF images

Java library for reading and writing IPTC metadata to JPEG and TIFF

余生颓废 提交于 2020-02-11 05:51:07
问题 Does anyone know some opensource Java library for reading and writing IPTC metadata to JPEG and TIFF? Now I'm using Apache Sanselan. Unfortunately, it can only read IPTC, not write (http://commons.apache.org/sanselan/formatsupport.html). Will be very grateful for your assistance. Denis. 回答1: Take a look at IIM4J. Use IIMWriter to write IPTC IIM tags into (jpeg) images. 回答2: The Apache Commons Imaging (formerly sanselan) has added support for writing IPTC metadata in the svn repo code for

iText7: Creating PDF from TIFF multipage image using iText

会有一股神秘感。 提交于 2020-02-04 06:40:29
问题 I am trying to use iText 7.1.1 to convert a TIFF image to PDF file with multiple pages. Thanks for those to get me started with this article Create PDF from TIFF image using iText. However, it is iText 5.5.x and I have trouble to duplicate it in iText 7. I did find TiffImageData.getNumberOfPages(raf) to replace int pages = TiffImage.getNumberOfPages(rafa) . However, I am not able to replace TiffImage.getTiffImage(rafa, i) in iText7. Do I need to use new Image(ImageDataFactory.createTiff(...))

Generated images showing flipped

旧时模样 提交于 2020-02-02 07:03:22
问题 We have a image, but it's showing flipped on Google Chrome, Safari, iOS and iPhone. But image showing correctly on IE and Android. How it could be? 回答1: The image is shown rotated because it contains an Exif Orientation field which is set to "Rotate 90 CW" (value 6). This could happen if the image was rotated in software that don't also update the Exif data. Chrome, Safari et al is honoring this field, while the software that shows the image "correctly" doesn't. According to the Exif fields,

Generated images showing flipped

断了今生、忘了曾经 提交于 2020-02-02 07:02:47
问题 We have a image, but it's showing flipped on Google Chrome, Safari, iOS and iPhone. But image showing correctly on IE and Android. How it could be? 回答1: The image is shown rotated because it contains an Exif Orientation field which is set to "Rotate 90 CW" (value 6). This could happen if the image was rotated in software that don't also update the Exif data. Chrome, Safari et al is honoring this field, while the software that shows the image "correctly" doesn't. According to the Exif fields,

Generated images showing flipped

非 Y 不嫁゛ 提交于 2020-02-02 07:02:21
问题 We have a image, but it's showing flipped on Google Chrome, Safari, iOS and iPhone. But image showing correctly on IE and Android. How it could be? 回答1: The image is shown rotated because it contains an Exif Orientation field which is set to "Rotate 90 CW" (value 6). This could happen if the image was rotated in software that don't also update the Exif data. Chrome, Safari et al is honoring this field, while the software that shows the image "correctly" doesn't. According to the Exif fields,