Indigo Rose Software

Go Back   Indigo Rose Software Forums > Old Versions > AutoPlay Media Studio 5.0

Reply
 
Thread Tools Display Modes
  #1  
Old 11-04-2003
Corey's Avatar
Corey Corey is offline
Registered User
 
Join Date: Aug 2002
Posts: 9,746
Using file size checks to prevent image swapping.

Ok further to the issue raised here recently about protecting the integrity of your application's images one solution is to use a file size check to exit the application if the images don't match. This can be made as simple or complex as you like. You can store your values in a table, etc... Here's a very simple example.

result = File.GetSize(_SourceFolder.."\\AutoPlay\\Images\\t est.bmp");
if result ~= 921624 then
Application.Exit();
end

Edit the value "test.bmp" to be your image file name and edit the number 921624 to reflect the file size number returned by AMS for your image. If you can't figure this value out run this code to get it by changing "test.bmp" to your file name.

result = File.GetSize(_SourceFolder.."\\AutoPlay\\Images\\t est.bmp");
Dialog.Message("Image Size", result);

I suspect this method is surprisingly effective for evading small time swappers. If you setup a table with your values and a function for validation you could manage any size project. (a tool to batch write image folder content values to an importable text flie would be cool and could easily be built using AMS)

For large projects don't verify all images on startup, simply verify them on a per-page basis. Using a function to do this makes it compact and quick. Just an idea...

Corey Milner
Creative Director, Indigo Rose Software
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -6. The time now is 08:06 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright © 2000 - 2009 Indigo Rose Corporation. All rights reserved.
Indigo Rose Software