locked
CropImage in Data Extension 1.0.0.0 RRS feed

  • Question

  • How CropImage work at all?
    I want take screenshot whole screen (or load images from file) and crop some part of it (square 100x100 pixels).
    Image = PictureTools.TakeScreenShot(0,0,0,0)
    GraphicsWindow.BackgroundColor = "black"
    newimage = PictureTools.CropImage(image,0,0,100,100)
    GraphicsWindow.DrawImage(newimage,0,0)
    All I have it blank screen.
    What I need enter in parametrs for crop left-upper corner? For crop square 100x100 pixels in random position of screen?
    PS SmallBasic 1.0
    PPS Sorry for bad english.

    Friday, August 19, 2011 1:17 PM

Answers

  • Both Crop and TakeScreenShot have some memory issues that cause failing. I have found the error and fixed it and the release will be before September.

    This demonstration code should write FAILED to Console.

    Image = PictureTools.TakeScreenShot(0,0,0,0)
    TextWindow.WriteLine(Image)
    GraphicsWindow.BackgroundColor = "black"
    newimage = PictureTools.CropImage(image,0,0,100,100)
    TextWindow.WriteLine(Image)
    GraphicsWindow.DrawImage(newimage,0,0)
    



    Sorry My Bad English
    • Marked as answer by litdev Friday, August 19, 2011 7:11 PM
    Friday, August 19, 2011 3:07 PM

All replies

  • Both Crop and TakeScreenShot have some memory issues that cause failing. I have found the error and fixed it and the release will be before September.

    This demonstration code should write FAILED to Console.

    Image = PictureTools.TakeScreenShot(0,0,0,0)
    TextWindow.WriteLine(Image)
    GraphicsWindow.BackgroundColor = "black"
    newimage = PictureTools.CropImage(image,0,0,100,100)
    TextWindow.WriteLine(Image)
    GraphicsWindow.DrawImage(newimage,0,0)
    



    Sorry My Bad English
    • Marked as answer by litdev Friday, August 19, 2011 7:11 PM
    Friday, August 19, 2011 3:07 PM
  • Thanks, this is exactly what I wanted to read. The problem is not in my head or in my hands but in the extension. looking forward to the update.
    Friday, August 19, 2011 3:20 PM