Example script - Using Oversized BackBuffer

Discussion in 'Sythe Lib Archive' started by Zavada, May 4, 2017.

Example script - Using Oversized BackBuffer
  1. Unread #1 - May 4, 2017 at 12:12 AM
  2. Zavada
    Joined:
    Nov 19, 2014
    Posts:
    294
    Referrals:
    2
    Sythe Gold:
    332
    Valentine's Day 2017 St. Patrick's Day 2017 Jigsaw Two Factor Authentication User Easter 2017

    Zavada Forum Addict
    $5 USD Donor New

    Example script - Using Oversized BackBuffer

    This script requires you to have a file named "test.bmp" in the same directory as SytheLibProt.exe and that you have Notepad open.

    Code:
    SetWindow("Notepad")
    Scrape();
    
    var file = LoadBitmapFromFile("test.bmp",0,false);
    var scraped = LoadBitmapFromString(DumpBackBufferToBitmapString(),0,false);
    
    //Zeroes backbuffer and reallocates space
    EraseBackBuffer();
    ForceOversizedBackBuffer(1920,1500);
    
    //Appends bitmaps to backbuffer
    BitmapToBackbuffer(0,0,scraped,0);
    BitmapToBackbuffer(0,1080,file,0);
    
    var end = LoadBitmapFromString(DumpBackBufferToBitmapString(),0,false);
    
    SaveBitmapToFile(end,"result.bmp");
    
    //Deallocates all bitmaps
    DestroyBitmap(file);
    DestroyBitmap(scraped);
    DestroyBitmap(end);
    
    NOTE: If you use my input file, make sure to use Paint to make it a BMP, not a PNG!
    Input file:
    [​IMG]
    Result:
    [​IMG]

    The main reason this script was made was to test SytheLib's ability to stitch images together through the proxy of the BackBuffer
     
    ^ Sythe likes this.
    Last edited: May 4, 2017
< Example script - OCR | Example script - Using native windows dialogues with alpha4 and above >

Users viewing this thread
1 guest


 
 
Adblock breaks this site