tiff

TIFF plot generation and compression: R vs. GIMP vs. IrfanView vs. Photoshop file sizes

为君一笑 提交于 2019-11-28 03:45:10
问题 I generated some high resolution publication quality plots for example library(plot3D) Volcano<-volcano zf=10 #zoom factor tiff("Volcano.tif", width=1800*zf, height=900*zf, res=175*zf, compression="lzw") image2D(z = Volcano, clab = "height, m",colkey = list(dist = -0.20, shift = 0.15,side = 3, length = 0.5, width = 0.5,cex.clab = 1.2, col.clab = "white", line.clab = 2,col.axis = "white", col.ticks = "white", cex.axis = 0.8)) dev.off() the file is 22 MB. Now I open the file with GIMP and

PIL(low) and multi-page TIFFS

杀马特。学长 韩版系。学妹 提交于 2019-11-28 02:00:40
This should be relatively easy, but who knows... Is there a way to retrieve the number of frames in a multi-page TIFF file using PIL/Pillow, without iterating through the whole stack until seek raises an error? Try using n_frames : from PIL import Image tiffstack = Image.open('my_img.tiff') tiffstack.load() print(tiffstack.n_frames) 来源: https://stackoverflow.com/questions/26660415/pillow-and-multi-page-tiffs

Merging two tiff image using c#.net

余生长醉 提交于 2019-11-28 01:28:07
问题 In my scenario i have two tiff image in different location say c:/temp/img1.tiff and x:/temp/img2.tiff . I need to merge these images as a single image programatically suggest some ideas/codes. Thanks, Dev 回答1: To do this using just the Framework classes, you basically do this: Load each of your TIFF images into a Bitmap object, e.g. using Image.FromFile . Save the first page with an encoder parameter Encoder.SaveFlag = EncoderValue.MultiFrame Save each subsequent page to the same file with

Splitting a multipage TIFF image into individual images (Java)

我与影子孤独终老i 提交于 2019-11-27 22:20:49
Been tearing my hair on this one. How do I split a multipage / multilayer TIFF image into several individual images? Demo image available here . (Would prefer a pure Java (i.e. non-native) solution. Doesn't matter if the solution relies on commercial libraries.) You can use the Java Advanced Imaging library, JAI , to split a mutlipage TIFF, by using an ImageReader: ImageInputStream is = ImageIO.createImageInputStream(new File(pathToImage)); if (is == null || is.length() == 0){ // handle error } Iterator<ImageReader> iterator = ImageIO.getImageReaders(is); if (iterator == null || !iterator

A good library for converting PDF to TIFF? [closed]

孤街浪徒 提交于 2019-11-27 19:12:14
I need a Java library to convert PDFs to TIFF images. The PDFs are faxes, and I will be converting to TIFF so that I can then do barcode recognition on the image. Can anyone recommend a good free open source library for conversion from PDF to TIFF? Disclaimer: I work for Atalasoft We have an SDK that can convert PDF to TIFF . The rendering is powered by Foxit software which makes a very powerful and efficient PDF renderer. I can't recommend any code library, but it's easy to use GhostScript to convert PDF into bitmap formats. I've personally used the script below (which also uses the netpbm

Image resources for iOS

折月煮酒 提交于 2019-11-27 18:46:32
I'm probably missing something obvious here, yet I've been unable to solve the following problem: I have a project with image resources for both normal and retina screens, like someimage.png and someimage@2x.png , which are stored in a separate bundle. When I build the project, Xcode automatically packs them into a single multipage tiff ( imageName.tiff ), I've checked it in finder - it is actually multipage tiff with both images. However, here comes a problem: I struggle to load appropriate resource. What I do is: NSString * imageName = ... ; NSLog(@"imageName: %@", imageName); UIImage *

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

佐手、 提交于 2019-11-27 18:38:49
问题 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

Split multi-page tiff with python

微笑、不失礼 提交于 2019-11-27 18:25:12
问题 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? 回答1: 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

Convert multipage TIFF to PNG .Net

旧街凉风 提交于 2019-11-27 15:24:54
问题 I am able to convert a single page TIFF to a PNG in .Net, however, how would I do this for a multipage TIFF? 回答1: 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

How to detect if a file is PDF or TIFF?

余生长醉 提交于 2019-11-27 12:59:27
问题 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.