Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 9 of 9
  1. #1
    Join Date
    Jun 2006
    Location
    UK SouthWest
    Posts
    420

    * Free * : Dynamic Masking Tool (DMT V2)

    Overview
    This is a Version2 tool for dynamic mixing of background masks in AMS to give the illusion of an extending 'Draw or Draws' on the side of the main program window. file size 24kb .It can be set up for multiple draws extending to many levels.
    Info on the orig version/concept can be found here: http://www.indigorose.com/forums/sho...&highlight=dmt



    This version is using Direct Memory Access to perform the pixel operations and is at least 13x faster than V1
    Using the DMT
    This is a Command Line Tool so its an .EXE file that has to have 3 bits of data passed to it to mix the masks. Note : all filenames have to be passed as 'short filenames' to avoid extra spaces in the command line.
    Syntax
    Code:
    [MainPic] [Action] [Draw]
    [MainPic] :A mask image of the program window with all the draws open
    [Action] : Either 'Add' or 'Sub' to add or remove a draw from the main Mask image
    [Draw] : A Mask image of a draw in the open position

    Example:
    Code:
    CommandLine = MainPic.." ".."Sub".." "..ADrawPicLocation;
    File.Run("AutoPlay\\Prg\\DMT.exe", CommandLine, "", SW_SHOWNORMAL, true);
    Global Functions example:
    Code:
    function OpenDraw(ADrawPicLocation)
    RunDMT (MainPic.." ".."Add".." "..ADrawPicLocation);
    Audio.Load(CHANNEL_NARRATION, "AutoPlay\\Audio\\Keys.ogg", true, false);
    return true
    end
    ----------------------------------------------------------------------------------------------------------------
    function ShutDraw(ADrawPicLocation)
    RunDMT (MainPic.." ".."Sub".." "..ADrawPicLocation);
    Audio.Load(CHANNEL_NARRATION, "AutoPlay\\Audio\\Knocker.ogg", true, false);
    return false
    end
    Download
    This prog is free for you to use in your own projects. A small note of credit would be appeciated in anything you use it for.
    Heres a quick example of how to use the DMT, its a demo prog with a few random functions in it.
    Download DMT_Clueless.rar

    Next ill be converting this and whole bunch of other image/picture functions into a DLL file which i that I may charge a small fee for.
    Last edited by clueless; 02-01-2008 at 04:43 PM.

  2. #2
    Join Date
    Dec 2004
    Location
    Texas
    Posts
    239
    Clueless I would love to use this but unfortunatly I haven't upgraded to AMS 7. If it's not too much trouble could you make the example for AMS 6? Please

  3. #3
    Join Date
    Jun 2006
    Location
    UK SouthWest
    Posts
    420

  4. #4
    Join Date
    Dec 2004
    Location
    Texas
    Posts
    239
    Thank you!

  5. #5
    Join Date
    Feb 2001
    Location
    Indigo Rose Software
    Posts
    2,728
    Nice demo.
    --[[ Indigo Rose Software Developer ]]

  6. #6
    Join Date
    Jun 2006
    Location
    UK SouthWest
    Posts
    420

    DMTv3 * Final *

    Thanks for the support guys

    Heres the final version of the DMT with some optional optimization.
    Filesize : 112kb

    Standard Drawing Mode-(v2 method) The DMT scans every pixel of the 'draw' image and add's or subbtracts the picture to the main mask.

    Optimized Drawing mode -You can 'pre-calculate' the area of the draw image so that only the horizontal lines of pixels that contain white get scanned to the main mask image. This can be up to 3 times faster to process than the old method.

    PreCalc Tool-Because of the way bitmaps are stored for fast direct memory access it takes a certain amount of calculation based on the width of the pic x (the bytes per pixel and the spacers in between each pixel) etc..to get the two numbers needed (startPixel,EndPixel) to make the optimization work. So to make this less stressful ive added a function to the DMT to do the maths for you . You dont have to run this every time you want to open the draws you just run it one time for each draw you have to find the magic numbers and then use them in your code -

    StartPixel,EndPixel-Doubble click the DMT in windows(no commandline) to open up the 'Pre-Calc' tool then select a 'draw' (you will have to do this once for each draw, but not the main mask) image and the program will give you the start and end pixel numbers needed to speed the drawing process up.

    CommandLine Syntax
    So the DMT is multi-functional now it can be used 3 ways ;-

    Standard Drawing Mode:- [ImgMain] [Method] [imgDraw]

    Optimized Drawing mode:- [ImgMain] [Method] [imgDraw] [startpixel] [EndPixel]

    DMT PreCalc Tool:
    - Just double click DMT.exe in windows.
    - Select Draw
    - add the numbers to the end of the commandline.

    Note: all filanames have to be 'short filenames' to avoid extra spaces in the commandline

    Sorry about the rapidshare download but the demo progs to big to upload here
    http://rapidshare.com/files/94425349/DMT3.apz

    This is the command line program on its own.
    Attached Files
    Last edited by clueless; 02-23-2008 at 09:38 PM.

  7. #7
    Join Date
    Jul 2007
    Posts
    1,512
    Soon as i get a upload script working i will let AMS users that offer progamers and Examples to there AMS member free uploading its a standard websever so
    none of this one time or slow downloads

  8. #8
    Join Date
    Dec 2003
    Location
    Location! Location!
    Posts
    6,137
    Quote Originally Posted by clueless View Post
    Thanks for the support guys

    Heres the final version of the DMT with some optional optimization.
    Filesize : 112kb

    Standard Drawing Mode-(v2 method) The DMT scans every pixel of the 'draw' image and add's or subbtracts the picture to the main mask.

    Optimized Drawing mode -You can 'pre-calculate' the area of the draw image so that only the horizontal lines of pixels that contain white get scanned to the main mask image. This can be up to 3 times faster to process than the old method.

    PreCalc Tool-Because of the way bitmaps are stored for fast direct memory access it takes a certain amount of calculation based on the width of the pic x (the bytes per pixel and the spacers in between each pixel) etc..to get the two numbers needed (startPixel,EndPixel) to make the optimization work. So to make this less stressful ive added a function to the DMT to do the maths for you . You dont have to run this every time you want to open the draws you just run it one time for each draw you have to find the magic numbers and then use them in your code -

    StartPixel,EndPixel-Doubble click the DMT in windows(no commandline) to open up the 'Pre-Calc' tool then select a 'draw' (you will have to do this once for each draw, but not the main mask) image and the program will give you the start and end pixel numbers needed to speed the drawing process up.

    CommandLine Syntax
    So the DMT is multi-functional now it can be used 3 ways ;-

    Standard Drawing Mode:- [ImgMain] [Method] [imgDraw]

    Optimized Drawing mode:- [ImgMain] [Method] [imgDraw] [startpixel] [EndPixel]

    DMT PreCalc Tool:
    - Just double click DMT.exe in windows.
    - Select Draw
    - add the numbers to the end of the commandline.

    Note: all filanames have to be 'short filenames' to avoid extra spaces in the commandline

    Sorry about the rapidshare download but the demo progs to big to upload here
    http://rapidshare.com/files/94425349/DMT3.apz

    This is the command line program on its own.

    Mirrored this offering on amsuser.com:

    http://www.amsuser.com/ams/examples/...7-clueless.rar

    Thanks clueless.
    Intrigued

  9. #9
    Join Date
    Jun 2006
    Location
    UK SouthWest
    Posts
    420
    Thanks

Similar Threads

  1. Best way to share custom buttons with the group?
    By mwreyf1 in forum AutoPlay Media Studio 6.0
    Replies: 10
    Last Post: 04-28-2010, 01:29 PM
  2. Example: Free tool : Dynamic Masking Tool
    By clueless in forum AutoPlay Media Studio 7.5 Examples
    Replies: 2
    Last Post: 04-25-2010, 07:37 AM
  3. ANSI To UNICODE Is Finished!
    By coderanger in forum AutoPlay Media Studio 6.0
    Replies: 7
    Last Post: 08-13-2007, 09:27 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts