unsupported format Old JPEG (in TIFF)

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

Moderator: Alex

Post Reply
ltdeta
Posts: 9
Joined: Tue Jul 05, 2011 8:57 pm

unsupported format Old JPEG (in TIFF)

Post by ltdeta » Fri Jan 27, 2012 12:51 pm

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

Image

Alex
Site Admin
Posts: 1461
Joined: Thu Jul 10, 2008 2:21 pm

Re: unsupported format Old JPEG (in TIFF)

Post by Alex » Fri Jan 27, 2012 1:04 pm

Hello,

What problem do you have?

Best regards, Alexander

ltdeta
Posts: 9
Joined: Tue Jul 05, 2011 8:57 pm

Re: unsupported format Old JPEG (in TIFF)

Post by ltdeta » Fri Jan 27, 2012 4:35 pm

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

Alex
Site Admin
Posts: 1461
Joined: Thu Jul 10, 2008 2:21 pm

Re: unsupported format Old JPEG (in TIFF)

Post by Alex » Sat Jan 28, 2012 8:36 am

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

ltdeta
Posts: 9
Joined: Tue Jul 05, 2011 8:57 pm

Re: unsupported format Old JPEG (in TIFF)

Post by ltdeta » Tue Jan 31, 2012 1:17 pm

i need to combine VintaSoftImaging.NET SDK and VintaSoftBarcode.NET SDK reading barcodes from "Old JPEG (in TIFF)"?

Alex
Site Admin
Posts: 1461
Joined: Thu Jul 10, 2008 2:21 pm

Re: unsupported format Old JPEG (in TIFF)

Post by Alex » Tue Jan 31, 2012 2:41 pm

Yes.

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

Best regards, Alexander

ltdeta
Posts: 9
Joined: Tue Jul 05, 2011 8:57 pm

Re: unsupported format Old JPEG (in TIFF)

Post by ltdeta » Thu Feb 09, 2012 11:38 am

can you explain "the way" simply?

Alex
Site Admin
Posts: 1461
Joined: Thu Jul 10, 2008 2:21 pm

Re: unsupported format Old JPEG (in TIFF)

Post by Alex » Thu Feb 09, 2012 1:00 pm

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

ltdeta
Posts: 9
Joined: Tue Jul 05, 2011 8:57 pm

Re: unsupported format Old JPEG (in TIFF)

Post by ltdeta » Thu Feb 09, 2012 5:21 pm

thanks :)

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests