c# - Generating a multipage tiff is not working -


I am trying to create a multipage TIFF file with an existing image:

  picture. Selection ActiveFrame (Frame Dimension.page, 0); Var image = new bitmap (image); (Using Var stream = new memorystream) {ImageCodecInfo codecInfo = null; Image Image (Encoder) in Foreign Currency (ImageCodecInfo.GetImageEncoders ()) {if (imageEncoder.MimeType! = "Image / Tiff") is on; CodecInfo = imageEncoder; break; } Var Parameter = New Encoder Parameter (Param = New) [New Encoder Parameter (Encoder. Sevflag, (Long) Encoder Value. Multifame)}}; Image. Save (stream, codecInfo, parameter); Parameters = new encoder parameter (Param = new [] {New encoder parameter (encoder.seflag, (long) encoder value .frame dementions page}}}; (var i = 1; i & lt; image .Getframecount (frame Dimension.page); i ++) {picture selection frames (frame dementions page, i); var img = new bitmap (image); image.SaveAdd (IMG, parameter);} parameter = new encoder parameters {super = New [] (new encoder parameter (encoder.sevfl C, (long) encoder value flush)}}; image.SaveAdd (parameter); stream.Flush ();}  

but it is not working (only the first frame image I do not know why. And I do not know why. I have to do a special frame of TIFF file (add annotation to it).

I do not know that it is easy to do this The way, but what I have in mind is to create a multipage TIFF from the original picture and add my own picture instead of that frame.

[the first part has been deleted after comment]

I am working with Multi-Page TIFF I am I found so many ways to handle TIFF using standard libraries (memory-related and frequent crashes on 16-bit gray scale images).

What is your test image? Have you tried multiple frames (especially preferably with the big '1' on the first frame, '2 on the next etc'; it can help you to set something on the frame included in the file.

Another useful diagnosis, Tiffendump utility can be, as in Libitif binaries (for windows also), will tell you which frame you have.

View

[edit] If you want to understand the .NET stuff I have found a new resource on multi-page shock using the standard .NET functionality (though I will be with Liberty.Net): If you download it, compare your code with Form1.cs function saveMultipage (..) The code snippet is similar (but still slightly different), especially in the end, flushing is done in a differnt manner, and the file is removed before the first frame ... [/ edit Please]


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -