Welcome to LEAD Support Forum Login | Register | Faq  

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

Multliple Image-Files in one library file
Started by delemed at 06-26-2008 4:23. Topic has 9 replies.

Print Search « Previous Thread Next Thread »
  06-26-2008, 4:23
delemed is not online. Last active: 6/25/2008 3:42:49 PM delemed

Top 150 Posts
Joined on 04-11-2008
Posts 19
Multliple Image-Files in one library file
Reply Quote
We did something like an Leadtools Image Library with RasterPro v13 (with LeadImageList). How can I put multiple images in one single file an access them in RasterImage Pro v15?

Thanks for any hints!

   Report 
  06-26-2008, 8:59
Adam Boulad is not online. Last active: 7/23/2008 4:14:05 PM Adam Boulad



Top 10 Posts
Joined on 09-16-2007
Posts 403
Re: Multliple Image-Files in one library file
Reply Quote
If you are using RasterImage, you can load the multipage file to the RsterImage object, and browse through the pages using the RasterImage.Page property. The index of the pages is 0-based and the maximum value is RasterImage.PageCount.
Adam Boulad
LEADTOOLS Technical Support

   Report 
  07-10-2008, 5:14
delemed is not online. Last active: 6/25/2008 3:42:49 PM delemed

Top 150 Posts
Joined on 04-11-2008
Posts 19
Re: Multliple Image-Files in one library file
Reply Quote
This is not exactly what I mean.... In Leadtools v13, there was something like a ImageList.save method, where you can save the whole list in one file and in the other way you can load different images out of this imagelist file.

We used this method to save our bitmaps we work with in our programs. It's an easy way to avoid single imagefiles on the disk.

How can I do this in v15? I don't find the .save method anymore...

Thanks for your support.

   Report 
  07-10-2008, 11:51
Adam Boulad is not online. Last active: 7/23/2008 4:14:05 PM Adam Boulad



Top 10 Posts
Joined on 09-16-2007
Posts 403
Re: Multliple Image-Files in one library file
Reply Quote

If you are use the LEADTOOLS .NET RasterImage object, you can load a multi-page file into a RasterImage and control the page that is selected using the RasterImage.Page Property. You can also save to multi-page file by saving page-by-page using RasterCodecs.Save to a file with the CodecsSavePageMode flag set to Append.

 

If you are use the RasterImageList Class, you can load files (including multi-page) to a RasterImageListItem Class using RasterCodecs.Load, and save them to a Multipage file using RasterCodecs.Save.

In anycase, you will have to save the multipage file page by page using the 'Append' Flag.


Adam Boulad
LEADTOOLS Technical Support

   Report 
  07-18-2008, 5:17
delemed is not online. Last active: 6/25/2008 3:42:49 PM delemed

Top 150 Posts
Joined on 04-11-2008
Posts 19
Re: Multliple Image-Files in one library file
Reply Quote
So, my concrete problem: How can I save 500 different images with different sizes, color-resolutions and image-formats into one single file? Is this possible with the method you described above?

Thanks in advance

   Report 
  07-20-2008, 11:53
Adam Boulad is not online. Last active: 7/23/2008 4:14:05 PM Adam Boulad



Top 10 Posts
Joined on 09-16-2007
Posts 403
Re: Multliple Image-Files in one library file
Reply Quote

If you use the TIFF file format, you can save almost any number of images (limited only by disk file size) into one file. Each page in this file can have a different size, different color resolution (bits per pixel), different palette (if the page is palettized), and stored with different compression (LZW, JPEG, CCITT G4, etc.)
Is this what you mean? What exactly does 'image-formats' mean?

If you want to save something like one BMP image, another JPEG image, and another GIF image and so on, all into one file, there is a way to do that in LEADTOOLS. However, the resulting file will need special handling in your code to be able to read it, and no other programs will be able to. Is this what you need?
Adam Boulad
LEADTOOLS Technical Support

   Report 
  07-21-2008, 3:25
delemed is not online. Last active: 6/25/2008 3:42:49 PM delemed

Top 150 Posts
Joined on 04-11-2008
Posts 19
Re: Multliple Image-Files in one library file
Reply Quote
yes, this is what I need. But in v13 this issue was very simple. You just could create an imagelist, holding all your images, and save the list with a .save("filename") method. The same thing worked also the other way around with a .load method. This was a very simple way to manage all your images in one file.

Here an example of your v13 code:
loading:
  imgList.Clear
  imgList.LoadDatabase App.Path & "\IMAGE.IDB"
  leadMain.Bitmap = imgList.Item(0).Bitmap
  ....
saving:
  If imgList.Count > 0 Then
    imgList.SaveDatabase App.Path & "\IMAGE.IDB", False
  End If
  ....

I think, the thing with paged tiff-file isn't really a smart solution for us. Maybe the variant described above is somewhere in leadtools v15 too?

   Report 
  07-21-2008, 8:56
Adam Boulad is not online. Last active: 7/23/2008 4:14:05 PM Adam Boulad



Top 10 Posts
Joined on 09-16-2007
Posts 403
Re: Multliple Image-Files in one library file
Reply Quote
In LEADTOOLS 13, the the ImageList.SaveDatabase method actually creates a multi-page TIFF file. Even if you don't call it image.TIF and instead call it image.IDB, LEADTOOLS will still be able to write it and read the file because it checks the internal format and compression regardless of the file name extension.
You can get the same result from LEADTOOLS 13 by either:
1- Use RasterCodecs.Save for every page to save each image to different compression, Bits Per Pixel.
2- Or use RasterCodecs.Save to save multiple pages with the same compression and different Bits Per Pixel. For example, using the code below in C#:
//---------
Save(image, destFileName, RasterImageFormat.TifLzw, 0, 1, pageCount, 1, CodecsSavePageMode.Append)
//---------
This code will save the pages in the 'image' to a LZW compressed TIF file with 0 Bits Per Pixel (which means the closet bits/pixel value supported by that format).
Adam Boulad
LEADTOOLS Technical Support

   Report 
  07-28-2008, 2:53
delemed is not online. Last active: 6/25/2008 3:42:49 PM delemed

Top 150 Posts
Joined on 04-11-2008
Posts 19
Re: Multliple Image-Files in one library file
Reply Quote
Have you lost some forum-data? I've posted another question last thursday I think? Anyway... here it is once again:

The method you described above works perfectly. But if I do it this way, I have to access every image by page-number. Is there a possibilty to do this by the original filename or can I set somthing like a "tag". Would be very nice to access the images by a string or something like that...

Thanks again...

   Report 
  07-28-2008, 8:26
Adam Boulad is not online. Last active: 7/23/2008 4:14:05 PM Adam Boulad



Top 10 Posts
Joined on 09-16-2007
Posts 403
Re: Multliple Image-Files in one library file
Reply Quote
Our moderator split that post into a new thread because it is more of a new question.
http://support.leadtools.com/SupportPortal/cs/forums/22503/ShowPost.aspx
Please refer to it for information regarding this issue.
In the future, create a new forum post when addressing a new issue.

Adam Boulad
LEADTOOLS Technical Support

   Report 
Post
LEAD Support Fo... » Developer » General » Multliple Image-Files in one library file

Powered by Community Server, by Telligent Systems