Page 1 of 1

unsupported format Old JPEG (in TIFF)

Posted: Fri Jan 27, 2012 12:51 pm
by ltdeta
is support are planned for this format in the near future?

Image

Re: unsupported format Old JPEG (in TIFF)

Posted: Fri Jan 27, 2012 1:04 pm
by Alex
Hello,

What problem do you have?

Best regards, Alexander

Re: unsupported format Old JPEG (in TIFF)

Posted: Fri Jan 27, 2012 4:35 pm
by ltdeta
sorry,

take a look on the Tif-file in the Zip-file linked below
http://www.file-upload.net/download-406 ... 2.zip.html

the format is Tiff with embedded old-Jpeg.

testing the BarcodeReader with this image i got the message "unsupported format Old JPEG (in TIFF)"

Re: unsupported format Old JPEG (in TIFF)

Posted: Sat Jan 28, 2012 8:36 am
by Alex
Hello,

VintaSoftBarcode.NET SDK does not have built-in decoders for image files, SDK loads images from files using .NET decoders.

.NET 2.0/4.0 does not support TIFF files with OldJPEG and ZIP compressions.

You can use VintaSoftImaging.NET SDK to solve the problem. VintaSoftImaging.NET SDK can load any TIFF images.

Best regards, Alexander

Re: unsupported format Old JPEG (in TIFF)

Posted: Tue Jan 31, 2012 1:17 pm
by ltdeta
i need to combine VintaSoftImaging.NET SDK and VintaSoftBarcode.NET SDK reading barcodes from "Old JPEG (in TIFF)"?

Re: unsupported format Old JPEG (in TIFF)

Posted: Tue Jan 31, 2012 2:41 pm
by Alex
Yes.

Imaging SDK is using for reading images, Barcode SDK is using for reading barcodes from images.

Best regards, Alexander

Re: unsupported format Old JPEG (in TIFF)

Posted: Thu Feb 09, 2012 11:38 am
by ltdeta
can you explain "the way" simply?

Re: unsupported format Old JPEG (in TIFF)

Posted: Thu Feb 09, 2012 1:00 pm
by Alex
Hello,

Here is a snippet of code which shows how to load TIFF image with OldJPEG compression and read barcodes from the image:

Code: Select all

' Important: You need Vintasoft.Barcode.dll, 
'                     Vintasoft.Imaging.dll, 
'                     to run this code.
Public Shared Sub ReadBarcodesUsingImaging(ByVal filename As String)
    Dim images As New ImageCollection()
    images.Add(filename)
    ' foreach images
    For Each image As VintasoftImage In images
        ' get page Image
        Dim pageImage As Image = image.GetAsBitmap()
        ' read barcodes
        ReadBarcodesFromImage(pageImage)
        ' free resources
        pageImage.Dispose()
    Next
    ' free resources
    images.ClearAndDisposeItems()
End Sub

Public Shared Sub ReadBarcodesFromImage(ByVal barcodeImage As Image)
    ' create barcode reader
    Dim reader As New BarcodeReader()

    ' EAN13, Code 39, Code128 and DataMatrix barcodes are extracted
    reader.Settings.ScanBarcodeTypes = BarcodeType.EAN13 Or BarcodeType.Code39 Or BarcodeType.Code128 Or BarcodeType.DataMatrix

    ' only horizontal barcodes are extracted
    reader.Settings.ScanDirection = ScanDirection.Horizontal

    ' read barcodes from image
    Dim infos As IBarcodeInfo() = reader.ReadBarcodes(barcodeImage)

    If infos.Length = 0 Then
        Console.WriteLine("No barcodes found.")
    Else
        Console.WriteLine(String.Format("{0} barcodes found:", infos.Length))
        Console.WriteLine()
        For i As Integer = 0 To infos.Length - 1
            Dim info As IBarcodeInfo = infos(i)
            Console.WriteLine(String.Format("[{0}:{1}]", i + 1, info.BarcodeType))
            Console.WriteLine(String.Format("Value:      {0}", info.Value))
            Console.WriteLine(String.Format("Region:     {0}", info.Region))
            Console.WriteLine()
        Next
    End If
End Sub
Best regards, Alexander

Re: unsupported format Old JPEG (in TIFF)

Posted: Thu Feb 09, 2012 5:21 pm
by ltdeta
thanks :)