Le 21 mars 07 à 19:52 Soir, Dan Nafe a écrit:

> I've dragged and dropped 62 JPEG images into my project, named
> image001 thru image062. I need to "SaveAsJpeg" these items, but do
> not know how to refer to them programatically.
>
>    Dim szFileName, szBuffer, szImageName, szUnits as string
>
>    for i = 1 to 62
>      if i < 10 then
>        szFileName = "image00" + str(i) + ".jpg"
>        szImageName = "image00" + str(i)
>      else
>        szFileName = "image0" + str(i)+  ".jpg"
>        szImageName = "image0" + str(i)
>      end if
>      picFile =TemporaryFolder.TrueChild(szFileName)
>      if picFile<>nil then
>        if picFile.Exists then picFile.Delete
>        picFile.SaveAsJPEG szImageName  //this DOES NOT work
>      end if
>    next i
>
> any ideas?

>        picFile.SaveAsJPEG szImageName  //this DOES NOT work

As you can see in the language reference, SaveAsJPEG requires a  
parameter of type Picture. szImageName is not a picture (since you've  
dimmed it as string).

If you really need to access these pictures from within the project,  
then you will have to make an array (like Joe suggests (I just see  
his message right now)).

Maybe it would be better to have these images in another physical  
folder? Or a big image that contains all the 62 images and you divide  
it later?
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to