Welcome to LEAD Support Forum Login | Register | Faq  

    LEAD Support Forum
  Resource to find answers and post technical questions about LEAD products.
Search    
   

Re: Can't load TIFJBIG file compressed
Started by johnbonds@hotmail.com at 06-23-2005 14:46. Topic has 1 replies.

Print Search Next Thread »
  06-23-2005, 14:46
johnbonds@hotmail.com is not online. Last active: 8/12/2008 1:21:12 PM johnbonds@hotmail.com

Top 500 Posts
Joined on 06-16-2003
Los Angeles, CA
Posts 11
Can't load TIFJBIG file compressed
Reply Quote

I scan a new image and save it to a multipage TIF file using the following line

pCodecs.Save(e.Image, LocalBatchFile, LEAD.Drawing.Imaging.ImageFormat.TifJbig, e.Image.PixelFormat, LEAD.Drawing.Imaging.Codecs.Codecs.SaveModifyConstants.Append)

I then try to load that image into memory using the following:

Dim pCodecs As New LEAD.Drawing.Imaging.Codecs.Codecs

Dim pLEADBitmap As New LEAD.Drawing.Bitmap

pCodecs.LoadCompressed = LEAD.Drawing.Imaging.Compression.Super

pCodecs.Load(pLEADBitmap, LocalBatchFile, LEAD.Drawing.Imaging.PixelFormat.DontCare, vPageNum, 1)

ctlImage.DisplayImage(pLEADBitmap)

pLEADBitmap.Dispose()

pCodecs.Dispose()

When the image gets loaded into memory however, the JBIG .BITMAP size reports 18072 in debug mode. When I use CCITT Group 4, it's 15476. Now the actual file is smaller using JBIG which is nice. However my application's memory utilization jumps 8-10MB when the single page is loaded from the TIF file as TIFJBIG and I can't seem to figure out why this is happening. Could someone please explain? Another note... Even after I dispose of the LEADBitmap, the memory usage stays.

Thanks


   Report 
  06-27-2005, 13:20
Maen Hasan is not online. Last active: 10/13/2008 7:35:45 AM Maen Hasan



Top 10 Posts
Joined on 08-05-2004
Posts 1,748
Re: Can't load TIFJBIG file compressed
Reply Quote

Hello,

 

It seems you are using LEADTOOLS DotNet version13 toolkit.

I tried to check the same issue using your code, but I need to know the following:

- What is the type of the ctlImage contro (in your code)?

- What is the BPP of the result Tif JBIG image?

- If you tried to save any another image (such as BMP image) to Tif JBIG format.

Then try to load it. Do you get the same results?

 

However, I checked this issue using the following code, and the image is loaded successfully on the LEAD Picture Box control:

=========================================

 Dim codecs As New LEAD.Drawing.Imaging.Codecs.Codecs

PictureBox1.LEADImage = LEAD.Drawing.Image.FromFile("c:\1.bmp")

 

codecs.Save(PictureBox1.LEADImage, "c:\test123.tif", LEAD.Drawing.Imaging.ImageFormat.TifJbig, LEAD.Drawing.Imaging.PixelFormat.Format24bppBgr, LEAD.Drawing.Imaging.Codecs.Codecs.SaveModifyConstants.Append)

 

codecs.LoadCompressed = LEAD.Drawing.Imaging.Compression.Super

codecs.Load(PictureBox1.LEADImage, "c:\test123.tif", LEAD.Drawing.Imaging.PixelFormat.DontCare, 1, 1)

=========================================

Please, try the same issue using this code.

Regards,


Maen Badwan
LEADTOOLS Technical Support


   Report 
Post
LEAD Support Fo... » Developer » JBIG » Re: Can't load TIFJBIG file compressed

Powered by Community Server, by Telligent Systems