tiff

How to create a TIFF file?

旧巷老猫 提交于 2019-11-29 08:09:29
How to create a TIFF file in PHP? I want create a TIFF file and fax it. I know how to fax it but I don`t know how to create a TIFF file. Jaimz Yes, ImageMagick . Don't count on trying to use the PHP extension for it though, you're going to be making shell commands to the convert command. It's as simple as: system('/path/to/imagemagick/convert orginal_image.jpg new_image.tiff'); Hope that helps. Aneeska ImageMagick is the solution. 来源: https://stackoverflow.com/questions/1951101/how-to-create-a-tiff-file

Save tiff CCITTFaxDecode (from PDF page) using iText and Java

北战南征 提交于 2019-11-29 04:44:15
I'm using iText to extract embedded images and save them as separate files. The .jpg and .png files come out ok, but I cannot extract tiff images that have the CCITTFaxDecode encoding. Does anyone have a way of saving the tiff files? I found some sample C# code that uses iTextSharp at Extracting image from PDF with /CCITTFaxDecode filter It indicates a separate tiff library is needed to write out the results. According to that article, the "CCITTFaxDecode" compression is Compression.CCITTFAX4 for the tiff library. To use that article's method, I need: 1. get a tiff library. The Java Image I/O

How to combine two or many tiff image files in to one multipage tiff image in JAVA

陌路散爱 提交于 2019-11-29 04:23:34
I have 5 single page tiff images. I want to combine all these 5 tiff images in to one multipage tiff image. I am using Java Advanced Imaging API. I have read the JAI API documentation and tutorials given by SUN. I am new to JAI. I know the basic core java. I dont understand those documentation and turorial by SUN. So friends Please tell me how to combine 5 tiff image file in to one multipage tiff image. Please give me some guidence on above topic. I have been searching internet for above topic but not getting any single clue. So please guide me friends. Thanks in advance. Gilbert Le Blanc I

Split multi-page tiff with python

此生再无相见时 提交于 2019-11-29 04:17:23
What's the best way to split a multi-page TIFF with python? PIL doesn't seem to have support for multi-page images, and I haven't found an exact port for libtiff for python. Would PyLibTiff be the way to go? Can somebody provide a simple example of how I could parse multiple pages within a TIFF? I do use ImageMagick as external program to convert multi-page fax into viewable PNGs: /usr/bin/convert /var/voip/fax/out/2012/04/fax_out_L1_17.tiff[0] -scale 50x100% -depth 16 /tmp/fax_images/fax_out_L1_17-0-m.png does convert first page to PNG aaa.tiff[1] would be second page, and so on. Or to

Tiff compression using Java ImageIO

会有一股神秘感。 提交于 2019-11-29 02:24:21
I am having issues converting a png to tiff. The conversion goes fine, but the image is huge. I think the issue is that I am not doing the compression correctly? Anyone have any suggestions?? Here is the code sample public static void test() throws IOException { // String fileName = "4958813_1"; String fileName = "4848970_1"; String inFileType = ".PNG"; String outFileType = ".TIFF"; ImageIO.scanForPlugins(); File fInputFile = new File("I:/HPF/UU/" + fileName + inFileType); InputStream fis = new BufferedInputStream(new FileInputStream( fInputFile)); PNGImageReaderSpi spi = new PNGImageReaderSpi

Convert multipage TIFF to PNG .Net

放肆的年华 提交于 2019-11-29 00:16:19
I am able to convert a single page TIFF to a PNG in .Net, however, how would I do this for a multipage TIFF? You should select active frame (page) in a loop and convert each tiff page to a png. int pageCount = 1; try { pageCount = bmp.GetFrameCount(FrameDimension.Page); } catch (Exception) { // sometimes GDI+ throws internal exceptions. // just ignore them. } for (int page = 0; page < pageCount; page++) { bmp.SelectActiveFrame(FrameDimension.Page, page); // save or otherwise process tiff page } This code assumes that you can load Tiff image in System.Drawing.Bitmap object. Alyson Freitas

Good Tiff library for .NET [closed]

妖精的绣舞 提交于 2019-11-28 23:14:54
I know libtiff for C, but haven't found a port for .NET. Does such a port exist? Bobrovsky My company recently released a free and open-source(New BSD license) version of LibTiff written using only managed C# (license permits commercial use and distribution). http://bitmiracle.com/libtiff/ What about using the built in .NET class? See "How to: Encode and Decode a TIFF Image" on MSDN. 来源: https://stackoverflow.com/questions/294391/good-tiff-library-for-net

How to detect if a file is PDF or TIFF?

﹥>﹥吖頭↗ 提交于 2019-11-28 20:32:33
Please bear with me as I've been thrown into the middle of this project without knowing all the background. If you've got WTF questions, trust me, I have them too. Here is the scenario: I've got a bunch of files residing on an IIS server. They have no file extension on them. Just naked files with names like "asda-2342-sd3rs-asd24-ut57" and so on. Nothing intuitive. The problem is I need to serve up files on an ASP.NET (2.0) page and display the tiff files as tiff and the PDF files as PDF. Unfortunately I don't know which is which and I need to be able to display them appropriately in their

Saving plot to tiff, with high resolution for publication (in R)

江枫思渺然 提交于 2019-11-28 16:43:27
A journal we are sending an article to is asking for the following: To ensure the best reproduction quality of your figures we would appreciate high resolution files. All figures should preferably be in TIFF or EPS format... and should have the following resolution: Graph: 800 - 1200 DPI Photo: 400 - 800 DPI Color (only CMYK): 300 - 400 DPI (DPI = dots per inch) Since I am sending a graph, I am trying to save it using tiff. Here is the code I am using: tiff(filename = "c:\\aaa.tiff", res = 800, pointsize = 2) plot(1:100) dev.off() But sadly, it produces a very "bulky" image - and if I where to

Python: Read and write TIFF 16 bit , three channel , colour images

匆匆过客 提交于 2019-11-28 16:14:10
Does anyone have a method for importing a 16 bit per channel, 3 channel TIFF image in Python? I have yet to find a method which will preserve the 16 bit depth per channel when dealing with the TIFF format. I am hoping that some helpful soul will have a solution. Here is a list of what I have tried so far without success and the results: import numpy as np import PIL.Image as Image import libtiff import cv2 im = Image.open('a.tif') # IOError: cannot identify image file tif = libtiff.TIFF.open('a.tif') im = tif.read_image() # im only contains one of the three channels. im.dtype is uint16 as