Jump to content

How to split an image?


Recommended Posts

I would like to split an image to multiple rectangles, what would be the most appropriate way ?

I think the best way to create the splited parts as new images, but how ?:whistle:

thanks!

My programs:[topic="40019"]Sudoku[/topic], [topic="41258"]Suitcase game & Random jokes[/topic], [topic="41641"]8 Queens[/topic], [topic="41679"]Puzzle Generator[/topic], [topic="42045"]Snake[/topic]My UDFs:[topic="41309"]Prime functions & Prime game[/topic]Other:Fake emailer
Link to comment
Share on other sites

There are a few image editing dll's out there that will accept coordinates and crop an image (which you could repeat 4x) .. but in my brief google search I didn't see any free ones. So, that may be one way.

AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc)
Link to comment
Share on other sites

I would like to split an image to multiple rectangles, what would be the most appropriate way ?

I think the best way to create the splited parts as new images, but how ?:whistle:

thanks!

I guess it depends upon the image type and whether you want to lug a DLL around with your application. Bitmaps are the easiest format to handle and Windows has all of the necessary API calls. You can split a bitmap into multiple rectangles fairly easy using the same routines that the ScreenCap module in Auto3Lib uses.
Auto3Lib: A library of over 1200 functions for AutoIt
Link to comment
Share on other sites

dunno but ya could attempt to create a device context than retrive certain areas of the context...... almost like backbuffer and replacing only what you need on the main context device ....

If you planning to do it in autoit why use a dll .... autoit can call api....

Link to comment
Share on other sites

Thanks I think the screenshot will make it ! But the best way would be sykeos idea to hide parts from the image and display parts, I have no idea on that one.

My programs:[topic="40019"]Sudoku[/topic], [topic="41258"]Suitcase game & Random jokes[/topic], [topic="41641"]8 Queens[/topic], [topic="41679"]Puzzle Generator[/topic], [topic="42045"]Snake[/topic]My UDFs:[topic="41309"]Prime functions & Prime game[/topic]Other:Fake emailer
Link to comment
Share on other sites

Thanks I think the screenshot will make it ! But the best way would be sykeos idea to hide parts from the image and display parts, I have no idea on that one.

If you take a look at the _ScreenCap_Capture function, you'll see it does exactly that. It creates a DC, copies the specified desktop region to the DC and then saves the DC as a bitmap. You can easily modify this to load a bitmap from a file and then use the same API calls to copy portions of the bitmap into another DC that you can save.
Auto3Lib: A library of over 1200 functions for AutoIt
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...