tiff

Write tiled output of TIFF, using ImageIO in Java

假装没事ソ 提交于 2019-12-06 08:29:50
问题 What I have is a a large number of frames that need to be placed together in a larger image (like a mosaic). The required positions of the images are known. There are a very large number of images so loading them all into memory is impractical at best. Based on some other answers here I was able to override the methods in RenderedImage (specifically getData(rect) ) to load in the appropriate data and return it. This works just fine, however the image writer is always calling getData and

Simple WPF page selection for multipaged tiff

老子叫甜甜 提交于 2019-12-06 07:53:25
I am making a basic Tiff viewer and need to be able to select the page to be viewed. In Winforms I could use selectActiveFrame, so I was wondering if there is a WPF equivalent for this. Thanks! EDIT: In winforms I used System.Drawing.Imaging.FrameDimension in the selectActiveFrame method if that helps at all. You can use the TiffBitmapDecoder class to load the image and then use the Frames property to access which tiff frame you like. 来源: https://stackoverflow.com/questions/4546994/simple-wpf-page-selection-for-multipaged-tiff

Create a Bigtiff (>4GB) File with Bitmiracle Libtiff.net

我的梦境 提交于 2019-12-06 06:34:05
First I want to thank Bitmiracle for this great lib. Even while creating very big files, the memory footprint is very low. A few days ago I ran into a problem where I wanted to create a tiff file bigger than 4GB. I created the tiled tiff file successfully, but it seems that the color of the tiles created beyond 4GB are somehow inverted. Here the code relevant code: Usage: WriteTiledTiff("bigtiff.tiff",BitmapSourceFromBrush(new RadialGradientBrush(Colors.Aqua,Colors.Red), 256)); Methods: public static BitmapSource BitmapSourceFromBrush(Brush drawingBrush, int size = 32, int dpi = 96) { //

How to read images using Java API?

心已入冬 提交于 2019-12-06 06:11:47
I have been using a piece of Software that works as a Reading Scanner. Basically it retrieves text from images. Is there any API for Java that would enable programmatically recognize text contained in images, in particular .tiff to regular text? Or is there any Java class that would help ... I do not know how to start istovatis This question was answered in previous post. Read Java OCR implementation Turn Image into Text - Java Read text from image file in Java This type of problem is called Optical Character Recognition or OCR. The first Google result for "Java OCR" looks promising: http:/

TIFFReadDirectory Warnings when reading GeoTiff with QPixmap::load( )

强颜欢笑 提交于 2019-12-06 05:42:09
问题 I have a geotiff file which I am loading into a QPixmap with QPixmap::load( ). I get the following warnings printed to the console a bunch of times. However, direct use of libtiff opens it without warnings. Any ideas on how to alleviate these unsightly warnings in QT? TIFFReadDirectory: Warning, foo: unknown field with tag 33550 (0x830e) encountered. TIFFReadDirectory: Warning, foo: unknown field with tag 33922 (0x8482) encountered. TIFFReadDirectory: Warning, foo: unknown field with tag

Javascript lossless image compression

╄→гoц情女王★ 提交于 2019-12-06 04:55:54
I am looking for a way to encoding a bmp image as a tiff or some other standard, compressed but lossless format in a browser (javascript). I guess if worst comes to worst I can write a library myself (getting the data from a canvas element) but I was hoping either: there's a better way to do it or someone else has already written something similar (I can't find a library). I have users wanting to upload ~ 4mb (8-bit monochrome) bmp files, which I can losslessly compress to ~700kb tiff files with LZW (or even better ~300kb lossless JPEG-2000). I'd like to do this before the files are uploaded

How to specify colormap when saving tiff stack

南楼画角 提交于 2019-12-06 04:49:28
I'm using tifffile in python to save out 3-channel tiff stacks, which I then want to read into ImageJ or FIJI. These tiff stacks open as composites in ImageJ with each channel assigned a (presumably default) colormap/LUT. However, the colors that are assigned aren't the colors that make sense for my images. My problem is that I can't figure out how to specify the colormap for each channel when saving the image using tifffile . For example, I'd like to have the following colormap assignments: ch 0: grays ch 1: green ch 2: red Here's the code that I'm using to save the files: # save hyperstack

Opencv: Why does the file size change when I read and write an image without making any changes?

淺唱寂寞╮ 提交于 2019-12-06 04:46:37
I have a list of (.TIFF) files which I am renaming and saving in the same format. I am using cv2 module to do this. import cv2 import os import glob os.chdir('C:/99_Temp/') for file in glob.glob("*.tiff"): f = os.path.splitext(file) time_val = f[0][:2] a1 = cv2.imread(file) cv2.imwrite(time_val+'.tiff',a1) Why are the file sizes reduced from the original TIFF file? I haven't done any processing and visually the images look the same. But I am wondering, why the difference? There could be many explanations of why the size of a TIFF file changes. Here are a few: one file may be RGB with 3 bytes

How do I convert multiple png images to a single tiff file

我的未来我决定 提交于 2019-12-06 04:25:33
I have a byte array of several images in the png format. I have to convert this to a tiff file and then into the corresponding byte array. This tiff file will hold multiple images. I have searced a lot, but I haven't been successful. The catch is. i have to do this in java only!! :) Can anyone provide some insight as regards my issue? I wont benefit from ImageMagick etc, because i have a server component that handles this conversion, and then saves it in the backend as a tiff. The client gies me a byte array which would translate into a png image. Arvind Jajoo Below is the solution. import

Merge multiple multi-page tiff images to a single tiff C#

烂漫一生 提交于 2019-12-06 04:22:57
In my scenario I have 3 or more multi-page tiff images which I need to merge into a single tiff image. Below is the the code I have tried. It merges in to a single tiff image but only with first page of all tiff images. private static void MergeTiff(string[] sourceFiles) { string[] sa = sourceFiles; //get the codec for tiff files ImageCodecInfo info = null; foreach (ImageCodecInfo ice in ImageCodecInfo.GetImageEncoders()) if (ice.MimeType == "image/tiff") info = ice; //use the save encoder Encoder enc = Encoder.SaveFlag; EncoderParameters ep = new EncoderParameters(1); ep.Param[0] = new