From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Walker Buddy
Sent: Wednesday, September 07, 2005 9:08 PM
To: RBG7-L Mailing List
Subject: RE: [RBG7-L] - Re: Pictures to a DB
2: TEXT vPicture = ('O:\DBSHARE\SA\PICTURES\'+.vJPGFile)
From: [email protected] on behalf of Javier Valencia
Sent: Wed 9/7/2005 8:22 PM
To: RBG7-L Mailing List
Subject: [RBG7-L] - Re: Pictures to a DB
Bob:
This how I do it:
I have a table that stores the equipment photo information and one
of the fields is the photo file name, first I create a TEXT variable with the
name of the photo file
vphoto_name = ( your_photo_file_name)
Then I create a BIT variable:
vphoto = (
IFEQ(.vphoto_name, NULL, 'rams.ico',(.veq_pdir + .vphoto_name) ) )
Where veq_pdir is a variable that contains the path to the
directory where the photos are stored; you can store the entire path/file name
as one variable.
The reason I do this is for when the particular record does not have a photo, it will display a little icon instead of the big red X, you do not have to do this but you have to have the name of the photo as BIT variable. Locate a variable image variable on the form and assign it the name vphoto and the photo should display. Under Property for the Variable Image I select Center and Proportional; you can play with the size and other properties until you find a combination that displays you photos best.
I also have a speed button next to the picture with the
following code
LAUNCH &vphoto_name
RETURN
This in effect will launch the default
picture editor for your file type and you can use it to edit the photo, in my
case Microsoft Photo Editor.
This is all there is to it; the approach is the same for
reports. Let me know if you need more information.
Javier,
Javier Valencia, PE
President
Valencia Technology Group, L.L.C.
14315
S. Twilight Ln, Suite #14
Olathe, Kansas
66062-4578
Office (913)829-0888
Fax (913)649-2904
Cell (913)915-3137
================================================
Attention:
The information contained in
this message and or attachments is intended
only for the
person or entity to which it is addressed and may contain
confidential and/or privileged material. Any review,
retransmission,
dissemination or other use of, or taking
of any action in reliance upon,
this information by
persons or entities other than the intended recipient
is
prohibited. If you received this in error, please contact the sender and
delete the material from all system and destroy all
copies.
======================================================
-----Original Message-----
From:
[email protected] [mailto:[email protected]]On Behalf Of
Castanaro, Bob
Sent: Wednesday, September 07, 2005 6:47
PM
To: RBG7-L Mailing List
Subject: [RBG7-L] - Re: Pictures to a DB
Thanks, Razzak, but I'm already doing that and am looking for
another
way. I actually DO NOT want to load the picture
into the database, I
just want to stick it in a variable
from an outside file. John gave me
some tips today
but I am too dumb to figure it out. I suspect a large
DUH donation at the conference from me...I KNOW there is a way to
do
this. Here is what I want to do:
Have a number of jpg files in a directory.
In a form or report, display those files as they associate with
field
contents.
For example, if
I have a text field with the name "John Smith" in it, I
want to display a picture on the form or report that is named
"john
Smith.jpg" from either the same directory or a sub
directory.
I'm sure I saw this somewhere! If not,
I'll go back and do it the hard
way.......
Also, You are right about the myriad of tools in the Blob Viewer
/
Editor, and some work pretty well, but have you
actually tried to CROP
an image? There is a
convoluted method where you have to click on the
mouse
control and got through several steps to do it. It works but it
is not like other graphic editors, where as ou hit a crop
control once
and a dotted square comes up with
adjustment handles over your image.
In this tool, it
takes too many steps, and in my particular upcoming
instance, I have to do this 500 times in one day...daunting.
Thanks in advance
Bob C
-----Original Message-----
From:
[email protected] [mailto:[email protected]]
On Behalf Of A. Razzak
Memon
Sent: Wednesday, September 07, 2005 3:27 AM
To:
RBG7-L Mailing List
Subject: [RBG7-L] - Re: Pictures to
a DB
At 10:54 PM 9/6/2005, Bob Castanaro wrote:
>... I totally forgot how to load a photo into a DB. I have
essentially
>a roster of names and addresses, and
what I want to do is add a picture
>of the person to forms and reports. I know there are several ways to do
>this, and have used the method to load the pic right into
the DB from
>the BLOB viewer, but that is sort of
limiting if you want to modify the
>picture. I guess I just want to have a graphic field that
will display
>a graphic image file from the same
directory or a sub-directory of the
>program, but
have the image file out there for modifications like
>cropping or brightness. I know there is an EASY way to do
this....
Bob,
While editing the data (Column with VARBIT data type) or using
the form
(DB Image), you can double-click on the
field/control to bring up the
built-in Note/BLOB Field
Viewer/Editor.
Among many cool features, the Note/BLOB Field Viewer/Editor also
include
the following features related to Image:
. Rotate (90, 180, 270, Arbitrary)
.
Flip (Horizontal, Vertical)
. Negative
. Crop ...
. Sharpen
.
Smooth
. Brightness (Increase, Decrease)
. Contrast (Increase, Decrease)
. Edge
Detection
. Emboss
.
Gamma
. Convert to Gray
. Format
Conversion
. Resize ...
If you want to automate the entire process you may use the
"RBBEdit"
command to achieve that goal and then use the
INSERT or UPDATE command
to load or update the BLOB
data.
Hope that helps!
Very Best R:egards,
Razzak.
