trichview.support
Re: Html image file name |
Author |
Message |
Mauricio Magni |
Posted: 01/09/2004 20:55:44 Hello Sergey, I'll try to explain the trouble again. I just want to know the name file that TRichViewEdit will use to save the images. I don't want to save the images by myself. The question is, why the very first name generated is incorrect while the others file names are ok?. Indeed, if I want to use the name generated by GetNextFileName to save the images I'll get an error because the first name already exist. Maybe I'm using the incorrect event to do this task. Thanks. Mauricio. "Sergey Tkachenko" <[email protected]> wrote in message news:[email protected]... > But you do not save any file in your code. > You just call GetNextFileName (thus increasing ImageSaveNo). > In order to really save it , you need to create a TJpegImage, assign it with > Graphic, the save this TJpegImage. Then set DoDefault to False. > > Since you do not set DoDefault to False, TRichView saves image itself > (increasing ImageSaveNo again). > > The best idea is to use Sender.SavePicture instead of > Sender.RVData.GetNextFileName (and set DoDefault to False). > But unfortunately there is a small bug in the current version that does not > allow to call SavePicture from inside OnSavePicture2. It will be fixed in > the next update for registered users. > > > > Hello Sergey > > This is the code that I'm using: > > """ > > var > > imageFile: string; > > begin > > imageFile := Sender.RVData.GetNextFileName(ImagePrefix,Path,'.jpg', > > ImageSaveNo, False); > > FImageList.Add(imageFile); > > end; > > """ > > > > > > "Sergey Tkachenko" <[email protected]> wrote in message > > news:[email protected]... > > > Hello, > > > > > > What's exact code in OnSaveImage2? > > > > > > > > > > Hello > > > > I need to know the image file names when exporting to html format, I'm > > > using > > > > the event OnSaveImage2, in order to get the image name I call the > > function > > > > GetNextFileName: > > > > imageFile := Sender.RVData.GetNextFileName(ImagePrefix,Path,'jpg', > > > > ImageSaveNo, False); > > > > The document has a background image and 2 standard images, when > execute > > > the > > > > code the first image name always has the sufix number 1 (imageprefix1) > > > > though actually the saved image has another sufix number (for > instance: > > > > imageprefix13), the other two images get the right sufix number. > > > > Does anybody know a workaround this? > > > > Thanks in advance. > > > > Mauricio. > > > > > > > > > > > > > > > > > > > > |
Powered by ABC Amber Outlook Express Converter