Click here to Skip to main content
15,879,844 members
Home / Discussions / C#
   

C#

 
AnswerRe: Pages file attribute. Pin
Dave Kreskowiak19-Sep-07 8:52
mveDave Kreskowiak19-Sep-07 8:52 
QuestionRe: Pages file attribute. Pin
Lord_Veralix19-Sep-07 9:25
Lord_Veralix19-Sep-07 9:25 
AnswerRe: Pages file attribute. Pin
Dave Kreskowiak19-Sep-07 10:05
mveDave Kreskowiak19-Sep-07 10:05 
AnswerRe: Pages file attribute. Pin
Lord_Veralix20-Sep-07 16:48
Lord_Veralix20-Sep-07 16:48 
GeneralRe: Pages file attribute. Pin
Dave Kreskowiak20-Sep-07 17:16
mveDave Kreskowiak20-Sep-07 17:16 
GeneralRe: Pages file attribute. Pin
Lord_Veralix20-Sep-07 17:27
Lord_Veralix20-Sep-07 17:27 
GeneralRe: Pages file attribute. Pin
Dave Kreskowiak20-Sep-07 17:55
mveDave Kreskowiak20-Sep-07 17:55 
AnswerRe: Pages file attribute. Pin
Big Daddy Farang20-Sep-07 6:44
Big Daddy Farang20-Sep-07 6:44 
Lord_Veralix wrote:
without of course moving the whole file into memory


Maybe. Here's what I would try:
1. Find a specification for tiff file format somewhere on the Internet.
2. Read the spec. until you find where in the file it stores the frame count. (I'm assuming this will be stored in one or two bytes near the beginning of the file.)
3. Open the tiff file and read enough of it to get the relevant byte(s.)
4. Close the file.
5. Convert the relevant bytes to frame count.

Assume from step 2 above that the frame count is in two bytes at offset 14. Then do something like this:

FileStream stream = File.Open (path, FileMode.Open, FileAccess.Read);
byte [] buffer = new byte [16];
stream.Read (buffer, 0, 16);
stream.Close();
frameCount  = (int) (buffer [15] * 256);
frameCount += (int) (buffer [14]);


I'm just guessing that the frame count is stored in the file header, but it might not be. Hope that helps, and good luck!

BDF
QuestionForm Styles.. Pin
Dio2219-Sep-07 7:03
Dio2219-Sep-07 7:03 
AnswerRe: Form Styles.. Pin
Luc Pattyn19-Sep-07 7:36
sitebuilderLuc Pattyn19-Sep-07 7:36 
GeneralRe: Form Styles.. Pin
Dio2219-Sep-07 8:43
Dio2219-Sep-07 8:43 
QuestionMonthCalendar refresh problem Pin
DeepToot19-Sep-07 5:35
DeepToot19-Sep-07 5:35 
AnswerRe: MonthCalendar refresh problem Pin
DeepToot20-Sep-07 3:34
DeepToot20-Sep-07 3:34 
QuestionC# - Sharing assembly between projects? Pin
wbjohnson19-Sep-07 5:24
wbjohnson19-Sep-07 5:24 
AnswerRe: C# - Sharing assembly between projects? Pin
Patrick Etc.19-Sep-07 15:51
Patrick Etc.19-Sep-07 15:51 
GeneralRe: C# - Sharing assembly between projects? Pin
wbjohnson19-Sep-07 21:14
wbjohnson19-Sep-07 21:14 
GeneralRe: C# - Sharing assembly between projects? Pin
Patrick Etc.20-Sep-07 3:53
Patrick Etc.20-Sep-07 3:53 
QuestionSplitting strings while taking escaped characters into account Pin
martin_hughes19-Sep-07 5:16
martin_hughes19-Sep-07 5:16 
AnswerRe: Splitting strings while taking escaped characters into account Pin
Larantz19-Sep-07 10:41
Larantz19-Sep-07 10:41 
QuestionInter process communication Pin
KrunalC19-Sep-07 4:42
KrunalC19-Sep-07 4:42 
AnswerRe: Inter process communication Pin
led mike19-Sep-07 5:09
led mike19-Sep-07 5:09 
GeneralRe: Inter process communication Pin
KrunalC19-Sep-07 5:12
KrunalC19-Sep-07 5:12 
GeneralRe: Inter process communication Pin
led mike19-Sep-07 5:51
led mike19-Sep-07 5:51 
QuestionError creatin window handle Pin
eoe19-Sep-07 4:09
eoe19-Sep-07 4:09 
AnswerRe: Error creatin window handle Pin
Judah Gabriel Himango19-Sep-07 4:37
sponsorJudah Gabriel Himango19-Sep-07 4:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.