Forum 'VintaSoft Barcode .NET SDK Discussions'

Questions, comments and suggestions concerning VintaSoft Barcode .NET SDK.

Board index < VintaSoft Barcode < VintaSoft Barcode .NET SDK Discussions

Login

unsupported format Old JPEG (in TIFF)



unsupported format Old JPEG (in TIFF)

Post by ltdeta »

is support are planned for this format in the near future?



Re: unsupported format Old JPEG (in TIFF)

Post by Alex »

Hello,

What problem do you have?

Best regards, Alexander


Re: unsupported format Old JPEG (in TIFF)

Post 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)

Post 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)

Post 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)

Post 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)

Post by ltdeta »

can you explain "the way" simply?


Re: unsupported format Old JPEG (in TIFF)

Post 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:
' 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)

Post by ltdeta »

thanks :)


Page 1 from 1: 1