Readme file for the JPEG Component Library version 1.5 ======================================================= This file contains documentation for the JPEG Component Library by MWA Software. This version is for Borland C++Builder 3.0. Versions for Delphi 1.0, 2.0, 3.0 and 4.0, and C++Builder 1 are also available. For further information please contact MWA Software - mailto:sales@mwassocs.demon.co.uk. http://www.demon.co.uk/mwa-soft ONLINE HELP IS ALSO AVAILABLE IN THE FILE mwjpeg.hlp. This file contains the following information: 1. ABOUT THE COMPONENT LIBRARY 2. INSTALLATION INSTRUCTIONS 3. USING THE JPEG DEMO APPLICATION 4. PRELIMINARY SOFTWARE DOCUMENTATION 5. PRICING INFORMATION 6. HOW TO REGISTRATION 7. SECURE REGISTRATION 1. ABOUT THE COMPONENT LIBRARY ============================== The JPEG Component Library provides two additional non-visual components for use under either Delphi 1.0, 2.0, 3.0 and C++Builder 1 and 3. It also provides a Data Aware JPEG Image component which may be used to save and access JPEG encoded images in a database blob field. A corresponding printable component is also provided so that you may print images from a database using Quick Reports. This file contains the C++Builder 3 version. Please access http://www.demon.co.uk/mwa-soft for the remaining versions. The two non-visual components are TJPEGFileCompressor and TJPEGFileDecompressor. These support compression of images to JPEG Format and decompression respectively. The data aware component is TDBJPEGImage, and the printable component is TQRDBJPEGImage. Simply installing these components JPEG enables the Delphi IDE. The components register themselves as supporting .jpg files and the JPEG compression format and, when you come to load an image into a TImage Picture, the JPEG format will be found amongst the list of supported file formats. An image loaded from a JPEG source can also be saved back to JPEG. These components support the JPEG File Interchange Format (JFIF). These two components also support TImage at run-time too. As at design time, if TJPEGFileDecompressor is included in your project, then calling TImage.Picture.LoadFromFile when the file extension is .jpg will automatically invoke the JPEG decompressor. You can also explicitly call TJPEGFileDecompressor to load a JPEG image from any file. TJPEGFileCompressor can be used to save a TImage.Picture in JPEG format, and can handle pictures that are either bitmaps or metafiles. It can also compress a device independent bitmap, and change the size of bitmaps before compression. TDBJPEGImage is linked to a database blob field and also uses TJPEGFileDecompressor and TJPEGFileCompressor to save and load JPEG encoded images from the Blob Field. Use of the JPEG compressor and decompressor components can be implicit if the default parameter settings are sufficient. On the other hand, the reference may be explicit to copies of these components with non-default parameter settings. TQRDBJPEGImage can be used to print a JPEG Image using Quick Reports 2. This software uses original software for JPEG developed by the Independent JPEG Group (see ftp://ftp.uu.net/graphics/jpeg). The IDG have made available a library of generic 'C' code supporting JPEG compression and decompression and have permitted its free use provided the source is acknowledged. The IDG code has been modified for use with Delphi and MS Windows and is provided as compiled object files. Optionally, they may be separately compiled into a dll. An interface to this software is provided by the unit jpeglib.pas. This is encapsulated as a set of Delphi components in the unit mwajpeg.pas, which also supports the mapping of the environment independent image format expected by the IJG code into MS Windows bitmap and metafile formats. When you purchase a licence to this product, you purchase a licence for the source code to the mwajpeg and jpeglib units and the right to include binaries derived from them in your own products without having to pay additional royalties. You also have a right to freely distribute the mwjpeg and mwjpeg32 dlls (if used), and copies of the modified 'C' source is also included in the registered version. Support is also provided by EMail albeit without a guaranteed response time. 2. INSTALLATION INSTRUCTIONS ============================ Installation is straightforward. The JPEG Component Library is distributed in a .zip archive; separate versions are provided for use with Delphi 1.0, 2.0 and 3.0, and C++Builder 1 and 3. Make sure you have the correct version and then: i. Create a new sub-directory in your delphi directory called "jpeg" and copy the remaining files contained in the .zip file into this new subdirectory. You should aim to preserve the directory names held in the zip - if you are using pkunzip them use the -d option when unzipping the files. Note that if you do use a different directory from that suggested then you will have to modify the demo programs' .mak files to change the search path for the JPEG components. iii. Start the C++Builder IDE and choose the Component|Install Packages menu item. Click on the "Add" button and browse for the mwjpegc3.bpl file you just copied to the new subdirectory. Click on OK. The package will now be installed. By default the JPEG components are placed on the "Additional" tab, TDBJPEGImage is on the Data Controls tab, and TQRDBJPEGImage is on the QReports tab. iv. You should now add ";$(BCB)\jpeg" to the end of the library path in the Tools|Environment Options dialog box (it's on the Library tab). This is so that the jpeg components can be automatically found in any project of yours that uses them. You should now restart C++Builder before trying to load a JPEG Image at Design Time. --------------- The components are now installed. Use the demo application to learn how they are used. 3. USING THE JPEG DEMO APPLICATION ================================== Two demo applications are provided. A JPEG Viewer application demonstrates the opening and saving JPEG image files and conversion to and from bitmap files (.bmp) and from Windows Metafiles (.wmf). A database application demonstrates use of the data aware component. The JPEG Viewer application may be found in the Examples\Viewer subdirectory created above. To activate, load the jpegdemo.bpr file into the IDE using the File|Open Project menu item. This provides a simple application that can open and save .jpg (JPEG), .bmp (Windows Bitmap) and .wmf (Windows metfaile) files, and copy and paste bitmaps and metafiles to and from the clipboard. To test out, simply compile and run the application. To load and view a JPEG file, click on the open button and load the test.jpg file contained in the subdirectory created above. You can also try saving it to another file name (you can save it as either a JPEG or a bitmap). You can also use the demo application to convert windows bitmaps and metafiles to jpegs simply by opening the file containing them (or pasting from the clipboard) and saving them as jpegs. The viewer window can also be resized by simply dragging the bottom right hand corner with the mouse. Saving the image will save it at the new size. The application also demonstrates a simple method for printing a JPEG Image using Quick Reports (even with no database). You can also use the Object Inspector to see the properties published by the two JPEG components. The JPEG database application may also be found in the Examples\db subdirectory created above. To activate, load the DBDemo.bpr file into the IDE using the File|Open Project menu item. This application is an extension of the Viewer and presents images held in an example database. The database records may be perused using the DBNavigator bar provided. It is still possible to save images from the database record and to replace/insert images from files or the clipboard. The application also demonstrates how to print a report including JPEG Images. 4. SOFTWARE DOCUMENTATION ========================= See the online help file "mwjpeg.hlp" 5. PRICING INFORMATION ====================== JPEG Component Library Source Licence 12 pounds sterling (US$20) US dollar prices are for indicative pricing only and assume an exchange rate of one pound = $1.66. All prices are VAT exclusive. UK VAT (currently 17.5%) will be charged for all UK residents and EC residents that are not VAT registered or do provide a VAT number as proof of registration. 6. HOW TO REGISTER ================== Registration may be made by FAX, Letter Post or EMail. For FAX and Letter Post registrations, a Registration Form is provided in the File "regform.txt" for you to EMail or print out (FAX or letter post), complete, and send to MWA Software. You can also register using the Compuserve Shareware Registration Service (GO SWREG). The software is registered under the name "MWA JPEG Component Library". Visa, Mastercard, Eurocard and JCB are accepted as payment mechanisms. International money orders in pounds sterling and cheques drawn on UK Bank Accounts are also accepted. US Dollar denominated checks are also acceptable provided that an additional 10% is added to the purchase price to allow for the additional Bank Charge. Please make cheques payable to McCallum Whyman Associates Ltd. EMail registrations should be sent to: Internet: sales@mwassocs.demon.co.uk, or Compuserve: 100041,315 FAX: UK: 01962 735581 Int: +44 1962 735581 MWA Software, P.O.Box 37, Alresford, Hants, SO24 9ZF, ENGLAND All registrations are accepted on the basis that the registered user will be deemed to have accepted and be bound by the licence conditions for the registered versions of JPEG component library as recorded in the file reg-lnce.txt supplied with the evaluation version of the software. 7. Secure Registration by EMail ================================ There are two routes by which you can EMail your credit card details to MWA Software without incurring the risk of sending a credit card number in clear across the Internet. One route is to use the encryption mechanism provided by pkzip. The other is to use PGP. pkzip encryption will generally be good enough to avoid detection by the so called "sniffer" programs that are understood to monitor EMail communications, looking for numbers that look like credit cards. However, it is not believe to be good enough to resist a determined attack by someone who has access to the necessary skills in cryptography and a powerful enough computer. On the other hand PGP is understood to offer a very strong level of protection. MWA Software makes no recommendations as to which is the better approach. It is for you to decide based on your own location and concerns. Secure Transmission using pkzip. ================================ pkzip can encrypt files in a .zip archive using a simple password. To register for the JPEG Component Library by EMail when using pkzip as your encryption engine: 1. Using the file "regform.txt" as a template, complete a registration form for the JPEG Component Library. Remember to include your credit card details, billing address and your name as it appears on your credit card. 2. Choose a password. Opening a dictionary at some random page is often a good way to do this. For example, let's assume that you choose NERVOUS as your password. 3. Compress and encrypt the modified regform.txt using pkzip and the -s option to encrypt. For example, with NERVOUS as your password, use the command line: pkzip -sNERVOUS regform regform.txt This will create regform.zip containing your compressed and encryted registration details. 4. EMail regform.zip to MWA Software. Your own EMail utility will usually have a way to send binary attachments to an EMail message. If you do not have such a capability then you can use the J-Write Text Editor (also available from MWA Software) to uuencode a binary file into a text form suitable for attaching to an EMAil message. This feature is available from the File|Merge menu item. The MWA Software EMail address is sales@mwassocs.demon.co.uk. Set the subject to "JPEG Registration" 5. Send the password you choose at step 2 in a separate EMail to MWA Software. For best protection, use our Compuserve EMail address: 100041.315@compuserve.com Set the subject to "re: JPEG Registration" Secure Transmission using PGP ============================= PGP is a powerful data encryption tool that has been made publicly available by its author "Phillip Zimmermann". It is sufficiently good to attract the attentions of various government's agency's and you should be aware that in certain countries the use of such encryption software is a criminal offence. MWA Software only uses PGP to decrypt registrations and does not send encrypted EMail. Having said that, the international version of PGP can be obtained from: http://www.ifi.uio.no/pgp/ The following URL is also a good source of information about PGP, including information on how to get the more limited US version. http://www.arc.unm.edu/~drosoff/pgp/pgp.html To encrypt a registration using PGP, do the following: 1. Using the file "regform.txt" as a template, complete a registration form for the JPEG Component Library. Remember to include your credit card details, billing address and your name as it appears on your credit card. 2. Encrypt regform.txt using PGP and the MWA public key. This is provided in the file "mwakey.asc", which should be in the same archive as this file. This will typically be performed by the following commands (the ; indicates the start of a comment): pgp -ka mwakey.asc ;add MWA key to your public keyring pgp -ea regform.txt "MWA Software" ;encrypt and encode for EMail pgp -kr "MWA Software" ;remove the MWA key from your keyring The above will have created the encrypted file "regform.pgp". This is a text file and may be sent as part of a normal EMail to MWA Software: sales@mwassocs.demon.co.uk Set the subject to "JPEG Registration" If you have any reason to doubt the validity of the MWA key, request an up-to-date version by EMail to the above address, with a subject of "Key Verification Request". Thank you for registering forthe JPEG Component Library.