416-621-9348 cgreaves@chrisgreaves.com Visit www.ChrisGreaves.com for this image! Chris_GEDC1894_Head (Small).JPG
Home Services Products

Embedded images (Home) ; Obtain set of original images on disk ; Build application ; Try with images embedded as images in a GUI form within the application ; Switch to images embedded as numeric strings within the application ; Converting a stored image to an ASCII string ; Converting an ASCII string to a stored image ; Optimizing storage of the embedded string ; Function to insert an image from an embedded string ; Macro to drive the function ; Essay with a string as a parameter (statement) ; Converting An Embedded String To A String ; Converting A String To An Array Of VBA Statements ; Converting an string of VBA assignment statements to an array of VBA code ; Converting an array of VBA code to a macro .


Loading

Toronto and Mississauga, Sunday, December 05, 2010 3:05 PM

Copyright © 1996-2010 Chris Greaves. All Rights Reserved.

Function To Insert An Image From An Embedded String

We need a general-purpose function which will create a table given its identifier and a string of data representing an image. The function must also know how many rows and columns a ne wtable should inherit, cell spacing, and many other table attributes.

We envisage a function which is given a descriptor string such as this:

";BudgetPrescription;2;0;1;0;0;2;0;2;,0.875,,,;,4,,,"

We might visualize this as a string describing a table known internally as “BudgetPrescription”. Its associated image file would have been “BudgetPrescription.JPG”, and the macro used to generate the table ought to include “BudgetPrescription” in its name.

There are two columns, cell spacing is at 0.875 inches, and so on.

The descriptor string carries enough information for the function to create a table, and to identify an image file.

The string of data representing an image must arrive by a separate parameter.

The image-string will look like this:

" 84 225 128 60 131 210 140 6 85 60 21 73 78 18 111 153 221 222 87 235"

althought it will be significantly longer than 72 characters!


Loading

Toronto and Mississauga, Sunday, December 05, 2010 3:05 PM

Copyright © 1996-2010 Chris Greaves. All Rights Reserved.