Questions tagged [libtiff.net]
The open-source .NET version of libtiff.
136
questions
0
votes
0
answers
26
views
Confidence value for libtiff
Other tools such as Tesseract return a confidence value for read text. Does Bit Miracle - libtiff offer this confidence value?
Would like to be able to test document for readability - for example not ...
0
votes
0
answers
51
views
Use libtiff.NET to read Exif GPSIFD directory and extract GPSLatitude, GPSLongtitude and convert them to decimal values
I'm trying to read the GPSIFD directory of a .tif file, and in particular read GPSLatitude,GPSLongtitude,GPSAltitude and convert them to decimal values.
So far I succeeded to read the GPSIFD, I used ...
0
votes
0
answers
85
views
Skewed Landscape TIFs from LibTiff.net
I'm using the following code to save images to JPG compressed TIFs.
This works if the width of the input image is divisible by 8. If it's not, then the image will be skewed.
So take 2 images:
1040x800....
0
votes
0
answers
180
views
How to split multipage TIF into byte arrays for each page to convert TIF to PDF?
I am using Libtiff.net and PdfSharp to convert multi-page TIF to PDF. The problem I have is that I cannot appear to get the data of a current page/directory and convert it to a byte array in order to ...
0
votes
0
answers
91
views
LibTiff C# .NET 6 - trim white space of image
I was able to crop white space from images using Bitmap. However, it is not supported in platforms other than Windows (https://learn.microsoft.com/en-us/dotnet/core/compatibility/core-libraries/6.0/...
1
vote
1
answer
393
views
How to use LibTiff.NET Tiff2Pdf in .NET 6
I want to provide support to convert single-page and multi-page tiff files into PDFs. There is an executable in Bit Miracle's LibTiff.NET called Tiff2Pdf.
How do I use Tiff2Pdf in my application to ...
1
vote
2
answers
943
views
Writing RGB values of the TIFF image with LibTiff
I'm trying to create a colormap (not sure about the right term) of the TIFF image - from this kind of image to such, and as i understand i need to modify all RGB values accordingly.
I'm having trouble ...
1
vote
1
answer
159
views
Using LibTiff.Net to inject tags inside TiffTag.IMAGEDESCRIPTION damages file
We are trying to inject a TimestampAnnotation into the StructuredAnnotations section of an OME-Tiff file. I'm getting the annotation in there correctly, but when I try to reload the tiff, all the ...
3
votes
1
answer
935
views
LibTiff C# - Getting coordinates
I am using the LibTiff.NET library to load GeoTiff data in C# (inside Unity).
**NOTE - I looked at GDAL also, but faced similar issues as outlined below, and would much prefer to use LibTiff if ...
0
votes
0
answers
170
views
Get an error writing Linear DNG via Libtiff .NET
I am trying to create a linear DNG file based on JPG using Lossy JPEG (34892) compression (which was introduced in DNG 1.4.0.0). After running the method below I got an error "Error: File format ...
0
votes
2
answers
649
views
How to get GeoTiff world-positioning metadata using libtiff.net
I am trying to get the bounding-box of a GeoTiff file from the ALOS dataset (JAXA):
Tiff terrainTiff = Tiff.Open(@"Assets/Project/Heightmaps/" + "N046E007" + "/ALPSMLC30_"...
1
vote
1
answer
1k
views
How can I get the point pixel values to an array from Tiff using C#?
I want to read the pixel values from Tiff images.
I have seen a similar question, but I still have no idea how to deal with normal Tiff images.
0
votes
0
answers
614
views
Saving the Tiff Image file using JPEG compression is time consuming
I am using Aspose.Imaging 19.11.0.0 for manipulating the Tiff Images with Compression JPEG,
But here If I have 10MB+ sized tiff files(having 50 pages) then in this case it is taking 30 to 40 minutes ...
1
vote
0
answers
1k
views
Writing multi-page Big Tiff saving in C++
I am writing an application to save multi-page tiff saving with big tiff library and I have two problems with the big tiff library:
So far I am able to save some images in a stack, but with the image ...
0
votes
0
answers
390
views
Not getting expected output while converting JPEG to TIFF image C# using BitMiracle.LibTiff.Net library
We are not getting expected output after converting JPEG file to TIFF using below property values.I am using BitMiracle LibTiff.Net library for this.
Output was visible 50% of actual image with blur ...
1
vote
2
answers
417
views
Could not install package 'BitMiracle.LibTiff.NET 2.4.633'...project that targets '.NETFramework,Version=v3.5'
Trying to upgrade BitMiracle.LibTiff.NET via NuGet from v2.4.633 to v2.4.626
Error: Could not install package 'BitMiracle.LibTiff.NET 2.4.633'. You are trying to install this package into a project ...
0
votes
0
answers
812
views
BitMiracle/libtiff.net copying pages to other tiff with compression
I am trying to built a program which reads a tiff file, selects a number of pages.
extracts those pages and will put it in a List
the Original tiffs have a TiffCompressOption.Ccitt4 compression.
...
0
votes
1
answer
218
views
How to get TiffCP to combine images with higher bit depth than 1
I am writing an application in C# that takes single page tiffs and combines them into a multi-page tiff. It works great except it fails on tiffs with a bit depth over 1. EG: 8 and 24 bit.
private ...
6
votes
2
answers
1k
views
What are the corresponding fields to set in libtiff or libgeotiff, given a minimal ESRI ASCII file?
I have an ESRI ASCII file of the form:
ncols 5
nrows 4
xllcorner 0
yllcorner 0
cellsize 10
NODATA_value -9999
25.4 26.1 27 28.6 27.7
25 26 26.4 27.9 27.4
25.1 25.8 ...
1
vote
1
answer
177
views
Saving colorindexed Tiff using LibTiff.net throws exception
I'm trying to save a colorindexed Bitmap to Tiff using Libtiff.net.
But it throws an OutOfRangeException:
The exception occurs if i set and indexed colormap:
internal static bool ...
5
votes
2
answers
2k
views
Create Geotiff using "LibTiff.Net", and add geographic information
I'm trying to create a geotiff (elevation DEM data) file by using Libtiff.Net.
The problem is that I have never succeeded to add the following two tags:
TiffTag.GEOTIFF_MODELTIEPOINTTAG
TiffTag....
1
vote
1
answer
355
views
Drop a Page/Layer from Tiff/SVS File
Is there an easy way to remove/drop a layer/page/directory from a tiff/svs file in C#? I am looking to remove a specific page from a series of tiff/svs files that is simple. It would be nice if it ...
2
votes
0
answers
379
views
Obtain the column value from geotiff raster file
I am using libtiff.net, and my geotiff file has exactly this format after being converted to ASCII Gridded XYZ ( via gdal_translate -of XYZ <input.tif> <output.xyz> function).
<...
0
votes
0
answers
535
views
Windows 10 Desktop crashes in endless loop when a certain TIF image is placed on the desktop
I developed a software that creates tiled TIF images.
A customer reports a TIF file that was created with my software that crashes Windows 10 desktop in an endless loop after it is placed on the ...
4
votes
2
answers
5k
views
SkiaSharp Tiff support
Currently, SkiaSharp doesn't support tiff images. (It supports jpg, gif, bmp, png, and a few others.)
How can you convert a tiff image into a SKBitmap object?
One idea: Perhaps there's an efficient ...
0
votes
0
answers
535
views
Reading multiple band image with C#
I'm trying to read images with multiple bands (multispectral images). A normal image normally has 3 bands (RGB). I learned that certain type of images (eg: satellite images) can have more than 3 bands,...
0
votes
1
answer
128
views
LibTIFF.NET convert tiled OJPEG to single tile image
We can observe that tiled OJPEG tiff files cannot be decompressed correctly. Is there any smart way to create a single tile interim file first?
0
votes
1
answer
2k
views
How to read all tiles from TIFF image using LibTiff.Net?
I'm new to TIFF and LibTiff.Net, I want to read tiled TIFF file and write it to other TIFF file. How can I achieve this?
Also any material on Tiff files would be greatly helpful.
Thanks in advance.
0
votes
0
answers
1k
views
Read a TIFF image in C# using libtiff.NET
I have a 16 bit grayscale tiff image that I need to read in C#. For that purpose, I use the libtiff.NET library. I tried to follow official tutorials which demonstrate how to read colored images. ...
2
votes
1
answer
2k
views
Reading 32-bit grayscale Tiff using Libtiff.Net
I've tried to read a 32-bit grayscale tiff file which each pixel in the image contains a floating point number. But during the reading process, the buffer array contains 4 values for each pixel. For ...
2
votes
4
answers
4k
views
GeoTIFF libtiff.net get elevation data in c#
I am trying to use libtiff.net to read elevation data from a GeoTIFF file.
So far I have mostly just been able to read metadata from the file using the example at libtiff.net's webpage.
But howto ...
0
votes
1
answer
1k
views
Tiff Editing: How to add text to existing tif file? [closed]
I am trying to add some random text to right top corner of the every tif image file. How I can do this using libtif.NET library.
Please Help
0
votes
1
answer
429
views
Changing in image colors when crop a tiff file using LibTiff.net
I've used the following code to crop some parts of a Tiff image using LibTiff.net library, but the image colors changed to false or pseudo colors.I also tried to change the photometric tag to other ...
0
votes
1
answer
2k
views
Create a tiled Tiff using LibTiff.net
I used LibTiff.net to crop part of a tiled Tiff and export it as a tiled Tiff but encountered the problem of "can not write tiles image to a stripped image". While the "Tiff.open("out.tif","w") make a ...
-2
votes
1
answer
719
views
Out of memory exception in reading a 1.5 GB tile-base Tiff file using LibTiff.Net
I tried to read and write a 1.5 GB tiled Tiff file using LibTiff.Net library as it's declared that support BigTiff (>4 GB) image files. I wrote the code below but get an error in line "buffer[tiles]......
4
votes
1
answer
898
views
Efficient way to write very large number of TIFF pages using libtiff.net
I'm using the following code to write a sequence of 16-bit grayscale images (empty array for the purpose of this question) to a multi-page TIFF :
int numberOfPages = 1000;
int width = 256;
int height ...
2
votes
2
answers
636
views
Remove frames from TIFF image using libtiff.net
I have a TIF with multiple pages inside (all are old style JPEG encoded). What I want to do is to remove some of the pages from the TIF.
I tried the FreeDirectory method but it seems no effect at all....
1
vote
1
answer
871
views
How to create world file in C# from a tiff image?
Is there any simple way to extract a world file in C# from a tiff Image?
I have a tiff image and I need to create a world file without any third party library.
0
votes
1
answer
1k
views
BitMiracle.LibTiff.Net Converting oJPEG tiff to Bitmap results in a negative color image
I'm using the BitMiracle.LibTiff v2.4.560.0 to convert oJPEG tiffs to Bitmap. This has worked out great until just recently. A Tiff, that I tried converting, is a document with a white background ...
3
votes
1
answer
848
views
Reading RGB values of a pixel with LibTiff - C#
I want to read RGB values of a pixel in C#, I tried using following code found here.
int[] raster = new int[height*width];
var b = tiffreader.ReadRGBAImage(width, height, ...
8
votes
3
answers
3k
views
More effective lossless compression for TIFF
I am trying to archive TIFF images in a database, and I would like to compress the images as much as possible, even at the cost of higher CPU usage and high memory.
In order to test the compressions ...
0
votes
1
answer
510
views
LibTiff.net - Save Directory
I have massive tiff file that contains 8 directories (resolutions). It's also a tiled.
I can cycle thru the directories and get the resolution of each. I want to save the 4th directory to a new tif ...
3
votes
0
answers
759
views
how to write jpegs to tiff (using libtiff?)
im trying to write a list of bitmaps to a tif
in standard .net code, the tif becomes a huge file, which i understand is due to the fact that it does not support jpeg compression
research shows that ...
2
votes
0
answers
563
views
How to supress tesseract TIFFReadDirectory Warnings under Windows?
I am using a Windows Distribution of Tesseract and have the problem that when each picture is converted from TIFF to text I get an (oldstyle!) Windows pop-up message with
"Unknown field with tag (...
0
votes
1
answer
525
views
Failing to write tiles with YCBCR photometric in Libtiff.net
I'm using Libtiff.net to write tiled images into a tiff file. It works ok if Photometric is set to RBG, but if I use YCbCr (in order to reduce file size), I get the error "Application trasferred too ...
2
votes
2
answers
2k
views
Large Number of 0 Values at End of Byte Array
I'm using BitMiracle's LibTiff.Net to read in a Bitmap image and return a TIFF byte[] that gets embedded in a file as a Base64String. I've noticed that the Base64 string ends up being quite a bit ...
0
votes
0
answers
1k
views
how to control TIFF image header's 1st IFD offset value while generating TIFF?
I would like to know is there a way to control the 4 byte data in TIFF image header which stores the 1st IFD offset value.
I have a situation, when I scan three different image and store directly ...
1
vote
1
answer
209
views
TiffCP Process won't close
I've created a windows service project that will use the TiffCP exe in order to split any tiff files its found into multiple tiff files. I'm using the code that was given as an example on the site:
...
1
vote
0
answers
727
views
Convert TIFF to Bitmap using scanlines
I am trying to use libtiffdotnet to work with TIFF files. I need to convert the TIF to System.Bitmap.
There is a sample in the documentation on how it can be done. But this method takes long time on ...
0
votes
1
answer
1k
views
Why does the Tiff.Open method always return NULL and not open a tiff file?
Overview:
I have an issue where 1 out of a hundred PCs just started having an issue with the LibTiff library not wanting to open ANY of my tiff images. I suspect it has to do with a dependency file ...