Home News Browse Search Reviews Interviews Webwatch Top 40
Poll Tips Glossary Codebase Links Lists Help Log in

 Code sample
Finding out the number of images in an MBM file.
Submitted by m on 14:52:05 20036 23rd June 2003 (2208 hits)
OPL32 : Graphics
Level: Intermediate
This procedure is quite useful when the number of images in an MBM file is unknown.

dpNote 0001 - 2 July 2002
www.dp.com.my
CONST KImageCounterOffset&=&00000010

PROC GetNoOfImagesInMbmFile&:(aMbmFileName$)
LOCAL IOstatus%,hMbm%,IOmode%,Offset&,NoOfImages&
REM --- open the image file
IOmode%=KIOModeOpen% OR KIOFormatBinary% OR KIOAccessRandom% OR KIOAccessShare%
IOstatus%=IOOPEN(hMbm%,aMbmFileName$,IOmode%)
IF IOstatus%<0
  RAISE KErrNotExists%
ENDIF
REM --- move to the position of the offset address of the image counter
Offset&=KImageCounterOffset&
IOSEEK(hMbm%,1,Offset&)
REM --- read the position of the image counter
IOREAD(hMbm%,ADDR(Offset&),4)
REM --- move to the position of the image counter
IOSEEK(hMbm%,1,Offset&)
REM --- read the image counter
IOREAD(hMbm%,ADDR(NoOfImages&),4)
REM --- close the image file
IOCLOSE(hMbm%)
REM --- return number of images in file
RETURN NoOfImages&
ENDP

[ show as plain text ]   [ codebase index ]
Comments: 0 [ expand all ] [ post a new comment ]

Disclaimer: The following comments are the responsibility of the poster. epoczone.com is not responsible in any way for what they may say.
If you have not already done so, please read the terms and conditions before you post a comment.

Digital SLR News - DSLR camera information

 Log in
Username:
Password:

 Poll
With very few new releases of software, no new PDAs, and very little site maintenance happening, should the EPOC Zone be shut down?
Yes, it's pretty much useless...
No, it's one of the last Psion outposts!
[ results ]

 Top 5
MyNotes
Biklog5
VoiceMan5
MBMView
PsiDat

 Tips
DjVu Viewer
Sdictionary
Sviewer - .TXT.GZ file viewer
Maximum memory for revo
CF-data is not secured




 Glossary
Revo
DI 27/DI 28
GPRS
Parse
Kill (an EPOC application)

 Codebase
Handing stacks
Finding out the number of images in an MBM file.
Plotting Math functions
word-wrapping editor ver. 3.26
word-wrapping editor ver. 3.26

 Mailing list
Enter your email address and hit 'Subscribe' to join the software mailing list

Search:
Keywords:
In Association with Amazon.co.uk


(C)opyright 1999-2007 epoczone.com
Not logged in.
Please read the legal stuff.
A shrunken.net site