tiff

How to convert a multi-page PDF to single-page TIFFs

♀尐吖头ヾ 提交于 2019-12-07 04:59:18
问题 This thread asks for how to convert multi-page PDF to multi-page TIFF with Ghostscript; "Tools to convert multipage PDF to multipage TIFF" However, I want to covert a multi page PDF to a number of single-page TIFFs: Each page in the PDF is expected to be converted to a single TIFF file. So the above answer does not exactly match what I need. How can I achieve this? I am using Windows XP. 回答1: Be sure to have a recent version of Ghostscript installed. Then you can run these commands: gs \ -o

How do I check for corrupt TIFF images in C#?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-07 04:38:46
问题 I searched on how to check if a TIFF file is corrupt or not. Most suggests wrapping the Image.FromFile function in a try block. If it throws an OutOfMemoryException, its corrupt. Has anyone used this? Is it effective? Any alternatives? 回答1: Please check out the freeware called LibTiff .NET. It has the function to check if every page in a TIF file is corrupted or not. Even partially corrupt also no problem http://bitmiracle.com/libtiff/ Thanks 回答2: Many tiff files won't open in the standard

matlab: how to save TIFF series?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-07 03:10:00
问题 Lets say I have a 3D array 'img' (x, y, frame) and want to save it as a TIFF. So far I was doing it by saving one-by-one like this: for K=1:length(img(1, 1, :)) outputFileName = sprintf('img_%d.tif',K); imwrite(img(:, :, K), outputFileName); end cool, but what if I want to save it as a one tiff stack? How to do it? Thanks :) 回答1: The parameter 'append' seems to correspond to what you want. outputFileName = 'img_stack.tif' for K=1:length(img(1, 1, :)) imwrite(img(:, :, K), outputFileName,

fseek to a 32-bit unsigned offset

微笑、不失礼 提交于 2019-12-07 00:43:42
I am reading a file format (TIFF) that has 32-bit unsigned offsets from the beginning of the file. Unfortunately the prototype for fseek, the usual way I would go to particular file offset, is: int fseek ( FILE * stream, long int offset, int origin ); so the offset is signed. How should I handle this situation? Should I be using a different function for seeking? You can try to use lseek64() ( man page ) #define _LARGEFILE64_SOURCE /* See feature_test_macros(7) */ #include <sys/types.h> #include <unistd.h> off64_t lseek64(int fd, off64_t offset, int whence); With int fd = fileno (stream); Notes

Converting 24BPP to 4BPP with GDI+ in VB.NET

纵饮孤独 提交于 2019-12-06 14:02:22
My VB.NET program currently takes a 4BPP TIFF as an Bitmap, converts it to a Graphic, adds some text strings and then saves it out again as a TIFF file. The output Bitmap.Save() TIFF file by default seems to be 24BPP (regardless of the input) and is a lot larger than the original TIFF. Is it possible to keep the same 4BPP palette encoding as the input for the output and if not, how can I convert my Bitmap PixelFormat from 24BPP to 4BPP Indexed. I've seen an example for converting 24 BPP to 1 BPP at http://www.bobpowell.net/onebit.htm using BitmapData.Lockbits() but cannot figure out how to do

TIFF with JPEG-compression much larger than original JPEG

点点圈 提交于 2019-12-06 13:37:06
I am trying to convert JPEGs to TIFFs with JPEG-compression using FreeImage.Net and C#. This works fine, however, for low-quality JPGES the TIFF-files are a lot larger than the original. I assume the TIFF-size does not depend on the original JPEG-Quality, because the output-images were always about the same size. For example (converting a screenshot): 2065kb JPEG (quality: 100%) --> 1282kb TIFF 379kb JPEG (quality: 50%) --> 1200kb TIFF This increase in size is not acceptable for our company, because our clients and we are dealing with quite a lot of documents. Interestingly enough, I get about

Render HTML to TIFF

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-06 13:15:08
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! GeReV 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 and dependencies and provides HtmlRenderer.Render() function which renders to a Graphics object. You

Create JavaFX Image from PGM or TIFF as fast as possible

情到浓时终转凉″ 提交于 2019-12-06 09:43:44
问题 I'm capturing images from a scanner device with java. The input format ist PGM or TIFF. I have to show up live results in the user interface. Actually I'm using ImageJ to read the source input stream as tiff, because ImageJ can also handle incomplete streams. After that the ImagePlus object is converted into a BufferedImage and finally into a JavaFX Image . ImagePlus imagePlus = new Opener().openTiff(inputStream, ""); BufferedImage bufferedImage = imagePlus.getBufferedImage(); Image image =

Remove page breaks in multi-page tif to make one long page

て烟熏妆下的殇ゞ 提交于 2019-12-06 09:23:44
I have some tif files with multiple pages that I would like to convert to a single long page. i.e. a file including two pages that are each 8.5x11 would be converted to a resulting file of size 8.5x22. Is there any way to remove the page breaks? I am not asking how to convert multiple files into a single file. Ben Walker I have solved this. A good chunk of the following code comes from Scott Hanselman on this page . This C# function takes a filename for the source image and a save location for its tiff output: public static void RemovePageBreaks(string fileInput, string fileOutput) { using

R: tiff( ) won't compress or set resolution to 300 ppi

♀尐吖头ヾ 提交于 2019-12-06 09:12:46
问题 I am trying to save some graphs using R for publication. I want to have them compressed with lzw and have the resolution at 300. For some reason it won't allow me to do this. In fact, it seems like R is ignoring some of the variables I set. For the code example, tiff(file="file.tiff", width=6.83, height=6.83, units="in", pointsize="12", compression = "lzw", bg="white", res=300, antialias = "none" ) outputs an uncompressed file of size 28 x 28 inches and a resolution of 72 ppi. A reproducable