How to Store Multipage Tiff into a ByteArray

Example requests & Code samples for GdPicture Toolkits.
Post Reply
sunseeker
Posts: 40
Joined: Mon Sep 08, 2008 2:28 pm

How to Store Multipage Tiff into a ByteArray

Post by sunseeker » Wed Oct 08, 2008 10:00 am

Hi Support-Team,

can you post please a vb example how to create a store a multipage tiff into a byte array without saving as file bevore?

ex. Imaging1.TiffSaveMultiPageAsByteArray FileBytes, lByteSize, "tif", 2

Greetz
Heiko

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: How to Store Multipage Tiff into a ByteArray

Post by Loïc » Fri Oct 10, 2008 11:54 am

Hi,

Currently, the only way is to create a multipage image into a file and to set the file content to a byte array:

IE:

Code: Select all

ReDim ByteArray(0 To FileLen("TheFile") - 1) as Byte
                 
fHandle = FreeFile()
Open "TheFile" For Binary Access Read As fHandle
Get fHandle, , ByteArray()
Close #fHandle 

Best regards,

Loïc

sunseeker
Posts: 40
Joined: Mon Sep 08, 2008 2:28 pm

Re: How to Store Multipage Tiff into a ByteArray

Post by sunseeker » Tue Oct 14, 2008 12:02 pm

I know this way. But you support Imaging1.SaveAsByteArray to save single images. Why not Multipage Tiff??

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: How to Store Multipage Tiff into a ByteArray

Post by Loïc » Tue Oct 14, 2008 4:27 pm

Code: Select all

Why not Multipage Tiff??
Simply because we haven't implemented this feature (it is on our wish-list ). Currently the way I gave you is the only one.

Best regards,

Loïc

mcarter
Posts: 2
Joined: Wed May 20, 2009 3:59 pm

Re: How to Store Multipage Tiff into a ByteArray

Post by mcarter » Wed May 20, 2009 7:09 pm

Is there any update to this? I REALLY need to save a multi-page TIFF to a byte array and I don't have the option of creating a new file on the PC's disk.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests