Copy protect images and web pages

Delivering encrypted images on the fly


Database delivery

Images can be imported into CopySafe Web and processed in batches of up 1,000 at a time. The limiting criteria is governed by the file size of the images and the available memory on the computer running the software.

Once you have your encrypted images they can also be delivered on the fly using templates to display the database results. Most of the applet parameters may apply to all images within a category or folder and can be static parameters in your templates. The important parameters that will vary between images can be image name, with and height.

To enhance database delivery CopySafe Web now saves encrypted images with a new name that includes the width and height for the applet/image. For example: Your_image0300-0200_C.class. For assistance in creating such templates that extract these details, please email for support.

Mix CopySafe and Secure Image class files

It's now possible to use both programs from the same codebase. Each program uses different class files and the image.class file names are also different. CopySafe images end with ****_C.class

Delivering images on the fly

With previous versions, to display encrypted images in a security applet, the governing parameters such as applet size and image file size had to be recorded additional to just using an image name.

If your image is named as 'Sunset_over_Darwin.jpg' and it is then encrypted and renamed as Sunset_over_Darwin_0320_0280_C.class. by using <%= artisImageName %> you can display "Sunset over Darwin" anywhere on the page for a title or menu link.

The ASP code to check if class file and get size details for example:

testImageName = rs.Fields("ItemImage")

Function RemoveLeadingZeroes(ByVal str)
    Dim tempStr
    tempStr = str
    While Left(tempStr,1) = "0" AND tempStr <> ""
    tempStr = Right(tempStr,Len(tempStr)-1)
    Wend
    RemoveLeadingZeroes = tempStr
End Function

If Right(testImageName,6) = ".class" then
    removeFileExt = Replace(testImageName,".class","")
    artisFileType= "class"
    tempSizeString = split(removeFileExt, "_")
    artisImageEncrypt = Right(removeFileExt,1)
    tempSizeAll = Right(removeFileExt,11)
    tempStripSize = split(tempSizeAll, "_")
    tempSizeHeight = tempStripSize(1)
    tempSizeWidth = tempStripSize(0)
    tempImageName = Replace(removeFileExt,tempSizeAll,"")
    artisImageName = Replace(tempImageName,"_"," ")
    artisImageWidth = RemoveLeadingZeroes(tempSizeWidth)
    artisImageHeight = RemoveLeadingZeroes(tempSizeHeight)
end if

The above script will strip portions of the file name giving several parameters that can be used to configure the security applet on the fly.

  • Image = <%= rs.Fields("ItemImage")%>

  • Template = <%= artisImageTemplate %>

  • Image width = <%= artisImageWidth %>

  • Image height = <%= artisImageHeight %>

  • File type = <%= artisFileType %>

  • Image Encrypt = <%= artisImageEncrypt %>

  • Image name = <%= artisImageName %>

If the image is in fact .class artisImageTemplate will return either 'C' for CopySafe or 'S' for Secure Image which can be used to determine which template to use for the applet (Secure Image applets are different).

if artisImageEncrypt = "S" AND artisFileType = "class" then
    artisImageTemplate = "secimage"
    elseif artisImageEncrypt = "C" AND artisFileType = "class" then
    artisImageTemplate = "copysafe"
    else
    artisImageTemplate = "normal"
end if

The above code was prepared for a custom catalogue where the client can add products using a web form and select various display options to apply to items within the same category or grouping. For example one product may be displayed as a normal jpg, while another might use a Secure Image or CopySafe Web encrypted image. All images are uploaded to the same folder which serves as the codebase for the entire catalogue.

Return to top