home *** CD-ROM | disk | FTP | other *** search
-
- FRAMER Version 1.0
- Copyright (C) 1994 P.J. Scholtz
- All rights reserved.
-
-
- P.J. Scholtz +27 (021) 22-2174 Office
- P.O. Box 237 +27 (021) 22-2178 Fax
- Stellenbosch +27 (021) 24-2208 BBS
- 7599
- South Africa
-
- Fidonet 5:7102/110
- Internet Pieter.Scholtz@f110.n7102.z5.fidonet.ORG
-
-
-
- CONTENTS
-
- 1) Introduction
- 2) Shareware
- 3) Registration
- 4) Legal
- 5) Documentation
- 6) FRAMER installation
- 7) GRABIT installation
- 8) GRABIT usage notes
- 9) Making objects
- 10) FRAMER functions and procedures
- 11) Run-time error messages
- 12) Software license agreement
-
-
-
- 1) INTRODUCTION :
-
- FRAMER is a library (DLL) for use with Windows 3.1 which
- allows for the programming of FRAME GRABBER cards, also
- called Video-in-a-Window. It contains extensive routines
- for anything from reading and writing a pixel right
- through to animation.
-
- It can be used to write a variety of software applications
- such as:
- - Police identi-kit
- - Hairdressing hair fitting simulation
- - Security/alarm
- - Tourist (project them into another scenario)
- - Plastic surgery
- - Animation
- - Games
- - Video overlaying
-
- It is designed for frame grabber cards based on the Chips&
- Technology chipset 82C9001A (PC-Video : Video Window -
- Controller).
-
- Cards based on this chipset include:
-
- - Creative Labs: VideoBlaster
- - PE-Von: PV100
- - Adda: Aver 2000
- - Aitech: Pro PC Video
-
-
- 2) SHAREWARE :
-
- This software is marketed under the Shareware concept.
- Unlike Public Domain software, Shareware may only be used
- in strict accordance with its registration policy. The
- concept of "look before you buy" in no way reduces the
- fact that you have to pay for the software.
-
-
- 3) REGISTRATION :
-
- P.J. Scholtz grants you the non-exclusive right to use one
- copy of the object code version of the FRAMER software for
- use on your computer system. You are entitled to evaluate
- the software on a royalty free basis for 30 days. Use
- after the 30 day evaluation period is subject to payment
- of the license fee specified below.
-
- FRAMER.DLL single user license US$ 100.00
-
- Note that each copy of FRAMER (i.e. on each computer it
- runs concurrently) must be registered. Which means that
- any software you develop and sell using FRAMER requires
- a registration for each copy you sell.
-
- There are no fees for using the example source code. You
- may modify and sell it as long as the registration fee is
- paid for each copy of FRAMER.DLL.
-
- Please fill in the attached ORDER.DOC order form.
-
-
- 4) LEGAL
-
- The FRAMER software has been tested extensively using a
- host of different systems and configurations. However
- P.J. Scholtz does not accept any liability for damage
- caused by the use of this software. The use of this
- software is at your own risk.
-
-
- 5) DOCUMENTATION
-
- FRAMER requires Windows to run in 386 Enhanced Mode.
-
- The documentation of FRAMER is in the form of three source
- code examples. Two are for Visual Basic and the third is
- for Turbo Pascal for Windows.
-
- First look at the Pascal source then at the Basic ALARM
- source and lastly at the Basic GRABIT source. That is the
- order of complexity.
-
- This first version of FRAMER is not very forgiving if you
- pass incorrect parameters. When you get a General -
- Protection Fault (GPF) then you know that something wasn't
- passed correctly or has not been set up correctly. Trace
- to the offending statement and check the parameters ...
- If a GPF occurs then you need to exit and reload Windows
- to refresh the FRAMER DLL. An example of when a GPF would
- occur is when colour-mixing an image and over-running the
- right-hand-side of the screen.
-
-
- 6) FRAMER INSTALLATION
-
- The first order of business is to set up the DLL's. Your
- frame grabber is supplied with it's own standard DLL. The
- VideoBlaster has a DLL called PCVIDEO.DLL. For the Adda -
- 2000 it is AV2K.DLL, PV100 is PV100.DLL etc.
-
- Copy the above DLL to \WINDOWS\FRAMEGRB.DLL. FRAMER
- requires you to call it FRAMEGRB.DLL and it also requires
- it to be installed in the \WINDOWS directory.
-
- Copy FRAMER.DLL into \WINDOWS as well. The example source
- files requires it there. You can change it to whatever you
- prefer.
-
-
- 7) GRABIT installation
-
- GRABIT requires 8MB of RAM installed in your computer to
- run. Don't even try running it with 4MB: you will wait
- forever ...
-
- I you do not have Visual Basic installed then you will
- need to download VBRUN300.DLL to run ALARM.EXE and
- GRABIT.EXE. VBRUN300.DLL should be installed in your
- \WINDOWS\SYSTEM directory.
-
- Before running GRABIT you must install the FRAMER DLL and
- your frame grabbers DLL.
-
- Create the directory C:\WINDOWS\GRABIT
- Copy all the GRABIT.ZIP files into C:\WINDOWS\GRABIT
- Copy all the GRABDATA.ZIP files into C:\WINDOWS\GRABIT
-
- The following files need to exist for GRABIT to run. A batch file
- is supplied to do the copying. It is called MAKEGRAB.BAT.
-
- Copy SLIDE1.MMP to STORE0.MMP
- Copy SLIDE1.MMP to STORE1.MMP
- Copy SLIDE1.MMP to STORE2.MMP
- Copy SLIDE1.MMP to STORE3.MMP
- Copy SLIDE1.MMP to PROFILE.MMP
- Copy SLIDE1.MMP to BEFORE.MMP
- Copy SLIDE1.MMP to FRONT.MMP
-
- Copy SLIDE2.MMP to LOGO.MMP
-
-
- 8) GRABIT USAGE NOTES
-
- While video is live and clicking on file 1-3 (via the
- camera icon) the video will be frozen and the frame will
- be stored to that file. Video will go back to live after 2
- seconds.
-
- When selecting freeze, file 1 will be loaded to the frozen
- screen.
-
- Using file 1-3 via the camera icon you can load different
- backgrounds while an object is on the frozen screen.
-
- The first time you select an object after freezing the
- video the color chart will appear after selecting the
- object. After that you need to specifically select color
- to change the colors.
-
- You can click the object icon while in live video. It will
- freeze frame and load the object selection screen.
-
- When you select a color from the color chart you are
- actually selecting a color range. The colors displayed on
- the color chart are averages.
-
- Clicking the color icon will display the color options as
- well as two color ranges. The top one is for the object
- color and the second is the brush color. The options allow
- for changing the object color, the brush color and to
- change the object to grey-scale. The black lines on the
- color-bars indicate the current color. Click on the color-
- bar to move the black line to that position and have the
- color changed.
-
- The first option via the fx icon is for zooming the object
- up/down and vertical/horizontal. The pull & push option is
- for squaring a section of the object and up/downing the
- squared area in a vertical or horizontal direction. Mirror
- flips the object horizontally. Object sink in combines the
- current object with the background. The scroll-bar on the
- end indicates the size of: movement, zoom and pull & push.
- The top is maximum and the bottom is minimum. The scroll-
- bar can be adjusted via the key-pad: 9 = maximum and 1 =
- minimum. Pressing 0 on the key-pad will clear the icons of
- the screen so you can see the complete screen.
-
- After selecting pull & push the cursor will change. You
- then need to select the starting corner of the area you
- wish to work with. After selecting the starting corner
- move the cursor to block the area you want. Click a second
- time to finalise the block selection. Now you need to
- click next to one side of the four side of the rectangle.
- Four button will appear where you clicked. Use plus to
- enlarge, minus to shrink. When done select yes to make the
- changes permanent or no to undo the changes.
-
- The save option via the file icon can store four images.
- It will save over the first one when you have saved four.
- The load option will display the four saved images, click
- on the one you like and it will be displayed full-screen.
- The logo option will display the logo file LOGO.MMP. The
- print option simply clears the icons of the screen.
-
- Whenever a image is displayed full-screen, clicking the
- mouse will return the icons.
-
- The icon in the lower-right-hand corner is your 'cursor-
- keys'. Click once in the relevant square to move a single
- step (remember the scroll-bar under fx for the step size).
- Click and keep the button depressed for continuous
- movement.
-
- The small square next to the movement icon is the brush
- size. Click it to step through the three sizes.
-
- Click on quit to exit the software.
-
- Double click the top-right-hand icon for a slide-show.
-
- Click and keep the button depressed on the undo icon for
- step-by-step undo. Double click the undo for a complete
- undo.
-
- The left mouse button paints on the object, the right
- mouse button erases. You can only paint/erase in the
- rectangular area of the object.
-
- When you select a new object it will be zoomed to the x
- and y zoom % of the previous object.
-
-
- 9) MAKING OBJECTS
-
- Probably the most important feature of the FRAMER DLL is
- the ability to mask objects. This allows for a variety of
- software to be designed. Each object needs to be in the
- .MMP format. Your frame grabber is supplied with a utility
- for viewing video and it allows for saving and storing in
- a few formats. It is also supplied with TRG2MMP and
- MMP2TRG.
-
- An object file requires a corresponding .RLE file. This is
- a Run-Length-Encoded file which maps the object. It
- indicates which pixels are to be displayed and which are
- "see-through".
-
- The process of making a object is as follows:
-
- 1. Capture an image and save it as a 24 bit .TGA (Targa)
- file.
- 2. Size the image so its width (X size) is divisible by 4.
- 3. Use editing software and paint the "see-through" parts
- black (RGB 0,0,0).
- 4. Run RLE&MMP in the directory which contains the .TGA
- file
-
- RLE&MMP requires TRG2MMP.EXE to be in the path. The result
- will be a .MMP, .RLE and a .RGB file. The .RGB file is
- used by the GRABIT Basic source example. The routine
- MASKIMAGE requires .MMP and .RLE files.
-
- Don't use MMP2TRG as it creates 16 .TGA files and RLE&MMP
- requires 24 bit .TGA files. Use the Windows utility to
- convert .MMP files to 24 bit .TGA.
-
- 10) FRAMER FUNCTIONS AND PROCEDURES
-
- SaveMMP : Save a rectangular area from the active
- page. Extension not assumed. File will be
- in the .MMP format. SaveMMP is a function.
- Filename : String
- X Start,
- Y Start,
- X Size,
- Y Size : Word
-
- LoadMMP : Load to the active page at X,Y. Extension
- not assumed. File must be in the .MMP
- format. LoadMMP is a function.
- Filename : String
- X Start,
- Y Start : Word
-
- SaveICO : Same as SaveMMP but stores in the frame -
- grabber buffer format. SaveICO is a
- function.
-
- LoadICO : Same as LoadMMP but expects file to be in
- the frame grabber buffer format. LoadICO
- is a function.
-
- SetActivePage : Sets the active page for FRAMER.DLL to
- work with. SetActivePage is a procedure.
- Page : word
-
- ClearPage : Blacks the specified page. ClearPage is
- a procedure.
- Page : word
-
- MaskImage : Masks an object. Extensions are assumed
- to be .MMP and .RLE. MaskImage is a
- function.
- Filename : string
- X Start,
- Y Start,
- ForceLoad,
- SourcePage,
- Destination : word
-
- BlockRGB : Fills a block on the active page. BlockRGB
- is a procedure.
- X Start,
- Y Start,
- X Size,
- Y Size,
- Red,
- Green,
- Blue : word
-
- RGBPutPixel : Puts a pixel on the active page.
- Specified in the RGB format.
- RGBPutPixel is a procedure.
- X Start,
- Y Start,
- Red,
- Green,
- Blue : word
-
- RGBGetPixel : Gets a pixel from the active page.
- Specified in the RGB format.
- RGBGetPixel is a procedure.
- X Start,
- Y Start,
- Red,
- Green,
- Blue : word
-
- YuvGetPixel : Gets a pixel from the active page.
- Specified in the YUV format.
- YUVPutPixel is a procedure.
- X Start,
- Y Start,
- Luma,
- Chroma1,
- Chroma2 : word
-
- YUVGetPixel : Gets a pixel from the active page.
- Specified in the YUV format.
- YUVGetPixel is a procedure.
- X Start,
- Y Start,
- Luma,
- Chroma1,
- Chroma2 : word
-
- CopyBlock : Copies a block from one page to another.
- CopyBlock is a procedure.
- X Start,
- Y Start,
- X Size,
- Y Size,
- SourcePage,
- Destination : word
-
- MoveBlock : Moves/Copies a block from one page to
- another. MoveBlock is a procedure.
- X Start,
- Y Start,
- X Size,
- Y Size,
- X Destination,
- Y Destination,
- SourcePage,
- Destination : word
-
- ColourChange : Changes the colour of the active page.
- Area indicated by the currently loaded
- object. A value of 100% indicates no
- change. ColourChange is a procedure.
- Red Start,
- Green Start,
- Blue Start,
- Red %,
- Green %,
- Blue % : word
-
- ColMixImage : Loads an object to the active page and
- changes the colour. Assumes extensions
- .MMP and .RLE. a value of 100% indicates
- no change. ColMixImage is a function.
- Filename : string
- X Start,
- Y Start,
- Forceload,
- DestinationPage,
- Red Start,
- Green Start,
- Blue Start,
- Red %,
- Green %,
- Blue % : word
-
- ColourBlock : Colours a block on the active page.
- ColourBlock is a procedure.
- X Start,
- Y Start,
- X Size,
- Y Size,
- X Addition,
- Y Addition,
- Red %,
- Green %,
- Blue % : word
-
- UpdateRleBlock: Updates the currently loaded .RLE.
- UpdateRleBlock is a procedure.
- X Start,
- Y Start,
- X Size,
- Y Size,
- AddRemove : word
-
- UpDateRleCircle:Updates the currently loaded .RLE.
- UpDateRleCircle is a procedure.
- X Start,
- Y Start,
- AddRemove : word
-
- YZoomImage : Zooms the active page. 100 % indicates
- no change. Zooms the area indicated by
- the currently loaded object. YZoomImage
- is a function.
- Factor : word
-
- YZoomBlock : Zooms a block on the active page. 100 %
- indicates no change. YZoomBlock is a
- function.
- X Start,
- Y Start,
- X End,
- Y End,
- Factor,
- Direction : word
-
- XZoomImage : Zooms the active page. 100 % indicates
- no change. Zooms the area indicated by
- the currently loaded object. XZoomImage
- is a function.
- Factor : word
-
- XZoomBlock : Zooms a block on the active page. 100 %
- indicates no change. XZoomBlock is a
- function.
- X Start,
- Y Start,
- X End,
- Y End,
- Factor,
- Direction : word
-
- InitVariance : Initialises the circular brush random
- value. InitVariance is a procedure.
- Value : word
-
- InitColours : Initialises the colours of the brush.
- InitColours is a procedure.
-
- Red,
- Green,
- Blue : word
-
- DrawCircle : Draw a circle on the active page.
- DrawCircle is a procedure.
- X Start,
- Y Start : word
-
- ClearCircle : Erase a circle on the active page.
- ClearCircle is a procedure
- X Start,
- Y Start : word
-
- CopyCircle : Copies a circle from one page to another.
- CopyCircle is a procedure.
- X Start,
- Y Start,
- SourcePage,
- Destination : word
-
- Freememory : Frees memory allocated during InitDll.
- Freememory is a procedure.
-
- InitDll : Initialises FRAMER.DLL for the number of
- pages required and for the specific type
- of frame grabber.
- Pages,
- CardType : word
-
- StoreRle : Make a internal backup of the currently
- loaded .RLE. StoreRle is a procedure.
-
- ReStoreRle : Restores the backed up .RLE. ReStoreRle
- is a procedure.
-
- StoreBlock : Make a internal backup of the area on the
- active page. StoreBlock is a procedure.
- X Start,
- Y Start,
- X Size,
- Y Size : word
-
- ReStoreBlock : Restores the backup block to the active
- page. ReStoreBlock is a procedure.
-
-
- 11) RUN-TIME ERROR MESSAGES
-
- The following are a list of FRAMER.DLL run-time errors.
-
- Error # Error Message
- 1 Invalid function number
- 2 File not found
- 3 Path not found
- 4 Too many open files
- 5 File access denied
- 6 Invalid file handle
- 12 Invalid file access code
- 15 Invalid drive number
- 16 Cannot remove current directory
- 17 Cannot rename across drives
- 100 Disk read error
- 101 Disk write error
- 102 File not assigned
- 103 File not open
- 104 File not open for input
- 105 File not open for output
- 106 Invalid numeric format
- 200 Division by zero
- 201 Range check error
- 202 Stack overflow error
- 203 Heap overflow error
- 204 Invalid pointer operation
- 205 Floating point overflow
- 206 Floating point underflow
- 207 Invalid floating point operation
- 210 Object not initialised
- 211 Call to abstract method
- 212 Stream registration error
- 213 Collection index out of range
- 214 Collection overflow error
-
- If you are running a Visual Basic program and a error pops
- up that simply states "ERROR" then it might very well be a
- division by zero error in a complex formula.
-
-
- 12) SOFTWARE LICENSE AGREEMENT
-
- By using this software, you agree to the terms of this
- agreement.
-
- No warranties are expressed or implied. In no event shall
- P.J. Scholtz be held liable for damages resulting from the
- use or misuse of this product, including but not limited
- to implied warranties of fitness for a particular purpose.
-
- The shareware version may be freely distributed as long
- as all files stay together and are not modified in any
- way. No cost may be charged for the shareware version
- beyond normal and reasonable copying and distribution
- expenses.
-
- No products developed with this software shall be sold
- unless this software has been registered with P.J. Scholtz.
-
- At no time for any reason shall this software be reverse
- engineered, decompiled or disassembled.
-
- This software may not be rented or leased.
-
- This software may be used only on one terminal or one
- computer at any one given moment in time. This software
- may not be installed on a network of any type. Contact
- P.J. Scholtz for networking options.
-
- The ownership of this software may be transferred as long
- as P.J. Scholtz is notified in writing of the transfer
- date and new owner. The new owner must agree to this
- contract. The transfer must include all registered updates
- and previously registered versions. The original owner may
- not retain any copies in any form of the registered
- software or its documents.
-
- -----------------------------------------------------------------------------
-