UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Adding Text To Jpg, Access 2007    
 
   
highwayrob
post Oct 29 2012, 02:51 PM
Post#1



Posts: 120
Joined: 29-April 08
From: North Florida, USA


I am copying JPG images from Outlook attachments within an Access application I have developed. I am saving the .JPG files to C:\ drive and would like to add text, such as the date and user comment, to the bottom of the image when I save the file.
blockquote> With oMessage.Attachments
.Item(iCtr).SaveAsFile "C:\" & .Item(iCtr).FileName
End With
Looking forward to any suggestions or sample code on how to do this?
Thank you in advance any help that is offered.
HighwayRob
Go to the top of the page
 
CyberCow
post Oct 29 2012, 03:19 PM
Post#2


UdderAccess Admin + UA Ruler
Posts: 19,555
Joined: 27-April 02
From: Upper MI


If mean you mean to actually embed the text as part of the image, have you tried using MS Paint? There is no easy code to do that.
Go to the top of the page
 
LPurvis
post Oct 30 2012, 05:11 AM
Post#3


UtterAccess Editor
Posts: 16,086
Joined: 27-June 06
From: England (North East / South Yorks)


You're doing this in Access? Stephen Lebans' beyond awesome Image control work should more than lend a hand...
Image Class / Picture Box here.
Go to the top of the page
 
CyberCow
post Oct 30 2012, 09:00 AM
Post#4


UdderAccess Admin + UA Ruler
Posts: 19,555
Joined: 27-April 02
From: Upper MI


OOh . . . Leigh - that is a clever find. Now I gotta set some time aside and test it out in A2K7/10.
ighwayrob - what version of Access are you using?
Go to the top of the page
 
highwayrob
post Oct 30 2012, 10:54 AM
Post#5



Posts: 120
Joined: 29-April 08
From: North Florida, USA


I am in Access 2007 with Visual Basic 6.5
I have downloaded and I am testing Stephen Lebans code...looks promising. I am going to import the modules into my project and see if I can get it to fly!
UtterAccess is the true source for real answers to Access challenges.
Rob
Go to the top of the page
 
CyberCow
post Oct 30 2012, 11:51 AM
Post#6


UdderAccess Admin + UA Ruler
Posts: 19,555
Joined: 27-April 02
From: Upper MI


Rob - would love to see your final solution for this.
Go to the top of the page
 
highwayrob
post Nov 12 2012, 05:03 PM
Post#7



Posts: 120
Joined: 29-April 08
From: North Florida, USA


Here is the condensed version of the code that ended up working.
Oinstalled ImageMagick and used the 'convert.exe' program.
Oddly, it does not accept spaces in the comment I am adding, a problem I will someday get back to and fix.
localfname = "C:\orig.jpg"
newlocalfname = "C:\new.jpg
tempComment = Format(Now, "Short Date") & "Comment_goes_here"
cmdString = PicDir & "convert " & localfname & " -background Khaki label:'" & tempComment & "' -gravity Center -append " & newlocalfname
Screen.MousePointer = 11
Call Shell(cmdString, vbNormalFocus)
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    16th December 2017 - 11:57 AM