tiff

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

Render TIFF image in Flex?

余生长醉 提交于 2019-12-08 15:05:49
问题 I have TIFF images in the database, and I need to render them in Flex. Please consider server-side conversion options as falling outside the scope of this question. Client-side conversion options interest me, if anyone has anything. 回答1: There is a Google Code Project which seems to have some AS3 / Flex client-side Tiff support. Check out the code in SVN. 来源: https://stackoverflow.com/questions/1428740/render-tiff-image-in-flex

Anyone have any luck writing a very fast tiff viewer/editor in Java?

两盒软妹~` 提交于 2019-12-08 12:50:59
问题 I have explored several leads (sample apps) in the JAI/ImageIO arena, and have so far come up lacking in performance. It may just be that Java is not the platform for fast viewing/scaling/editing of tiff files. I am looking to produce performance similar to Irfanview, but so far haven't found what I am looking for. JAI\ImageIO seems possible - but there seems to be many variations in how one can load/scale/display the images (in so far as performance is concerned). Anyone have any luck or

Printing a .TIF file

徘徊边缘 提交于 2019-12-08 12:22:53
问题 I am able to print a .GIF, .JPG or .PNG successfully using the following code snippet but it doesn't work for .TIF file. Also I can't get the color even after adding the chromaticity.color attribute. public class PrintImage { static public void main(String args[]) throws Exception { PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet(); pras.add(new Copies(1)); pras.add(chromaticity.color); PrintService pss[] = PrintServiceLookup.lookupPrintServices(DocFlavor.INPUT_STREAM.GIF,

Create shapefile from tif file using GDAL

人走茶凉 提交于 2019-12-08 04:01:58
问题 I am using library gdal to load a tiff file and create a shapefile. When I load my shapefile with QGIS GUI, There are no informations on the elevation. I would like to keep the elevation while the transformation. import os from osgeo import gdal,ogr,osr,gdalnumeric import numpy as np # this allows GDAL to throw Python Exceptions gdal.UseExceptions() print "reading tif file..." try: ds = gdal.Open( "file.tif" ) except RuntimeError, e: print 'Unable to open file' print e sys.exit(1) try:

Getting the pixel value of a TIFF image in Java

偶尔善良 提交于 2019-12-08 02:03:12
问题 The ImageIO package doesn't work with .tif images and I cannot create a BufferedImage (Class I'm more familiar with) from a .tif file. How do I easily get the pixel value of a TIFF image in Java? How can I do it FAST? I'm not experienced with image processing and some sample code would be greatly appreciated! Thanks! 回答1: You will need the Java Advanced Imaging API: JAI in order to work with TIFF images. From the JAI API description: TIFF In addition to the baseline specification, the encoder

Convert java.awt.Image to TIFF byte array with compression

末鹿安然 提交于 2019-12-08 01:30:14
问题 I have a java.awt.Image that I need to add CCITT T.6 compression and convert to a TIFF byte array. I have seen some examples of using TIFFImageWriteParam and other classes from the javax.imageio package but I can’t find a complete example going all the way from Image to byte array. Here is what I have so far beginning with a java.awt.Image obtained from scanning. This works just fine to generate a byte array of a TIFF, but I need to find a way, using TIFFImageWriteParam or some other means,

Simple WPF page selection for multipaged tiff

前提是你 提交于 2019-12-08 01:03:40
问题 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. 回答1: 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

How to read images using Java API?

混江龙づ霸主 提交于 2019-12-07 23:32:53
问题 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 回答1: This question was answered in previous post. Read Java OCR implementation Turn Image into Text - Java Read text from image file in Java 回答2: This type of problem is called

Render HTML to TIFF

孤人 提交于 2019-12-07 21:03:16
问题 I'm working on an application where the requirements call for the app to produce a TIFF image of an HTML document for storage in a document management system. I'm using ASP.NET MVC 3 and am curious if anyone else has run into similar requirements, and if so, how did you address? Thanks! 回答1: This particular solution wasn't suggested in @Select0r's comment above and I believe it's worth mentioning. I recently ran into this library on CodePlex. It's written completely in managed code without