CopySafe Web Return to index  

10.2 Web page - DLL interface

The following example shows how to call the DLL using Classic ASP and what information to pass.

Windows Server 2003 +

<%@ Language=VBScript %>
<%

Set ArtisWeb=Server.CreateObject("ArtisWEBImage.CopySafe")

'Force a refresh
Response.Expires = -1
Server.ScriptTimeout = 600

' some parameters loaded in from previous pages such as an upload page...

strAddFilename = request("Filename")
strAddFilesize = request("Filesize")
strAddCheck = UCase(Right(strAddFilename, 3))

'================================
' Set Copysafe Web paths
'================================

strOutPath = "C:\ArtistScope\Web\in"
strImageSource = "C:\ArtistScope\Web\out\" & strAddFilename

'================================
' Convert Copysafe Web image
'================================

if strAddFilename <> "" then

ArtisWeb.OutPath="" & strOutPath & ""
strAddImage = ArtisWeb.ProcessFiles ("" & strImageSource & "")
strImageClass = Replace(strAddImage, strOutPath, "")
strImageClass = Replace(strImageClass, "\", "")

response.write"New file= " & strImageClass & "<br>"
response.write "<br><br>Done!<br>"
end if


Set ArtisWeb = Nothing
%>


Typical usage

By uploading a normal image, the upload page can retrieve the filename and filesize, which can be passed to the conversion page as request query objects. To pass this info using ASP it may be best to collect tye info on the upload page and then perform a response.redirect like:

convert.asp?file=<%= strFilename %>&size=<%= strFileSize %>

The code for convert.asp can be like the example above. Each setup will be very different and the code example above is given as an explanation of how it works.

Resource

NOTE: The Encrypted Image Server DLL for interfacing the ArtistScope image converters are not included in the normal software package but it is available for free. However it is provided as is and without warranty.

Copyright © 1998-2017 ArtistScope. All Rights Reserved.