I made a quite simple program to allow one to select images from his computer and add it to a PB2 map.
Download:
https://www.dropbox.com/s/3t8souejx2kef ... G.exe?dl=0I am going to explain how it works, and make some observations too.
1. Activates a dialogue box to select an image, the selected image's location in your computer will appear at 2.
2. Text box where you can put the location of the image you want to add.
3. Activates a dialogue box to select an XML or a txt file, the selected file's location in your computer will appear at 4.
4. Text box where you can put the location of the XML file you want to add.
5. Progression on the X axis for transposing the image.
6. Progression on the Y axis for transposing the image.
7. Inserts the image into the file, 2, 4, 8, 9(impossible to have no value tho), 10, 11 and 12 need to have have some value, if the pixel's size/X position/Y position field(s) is text an error will happen.
8. Pixel size inside the game, as in how you see it, 10 being a single small square in the level editor.
9. Background, if white(3) it will half the RGB/HEX values because white background mulitiplies such value by two, so it is able to look natural.
10. X position where it will start.
11. Y position where it will start.
12. Door it will be attached to, #door*1 as example.
13. Runs the program but verifies for the alpha values, it will theoretically be slower than 7 but if alpha isn't 255, it will add no background, allowing people to remove parts from images and only add what is necessary.
14. Place where the selected image will appear.
15. Place where the selected image will appear after it has been inserted into the game file.
Observations:
Background white will divine the RGB/HEX value by 2, because the white background multiplies it by two.
You can input not valid values such as text for the pixel size field, but it will simply have an error to occur.
If the image is too big, it might take a very long time for it to process, if not crashing at all.
The program might stop working with big images, but the process is still going on.
Time for inserting and image purely depends on your machines capacity.
Added images can be extremely heavy.
It will always go from top to bottom and left to right when adding an image.
Only works with XML/txt files, does not work with pb2map files.
Any doubts let me know, use can be to simply add images for previews or whatever, or as sprites or textures, but it can get extremely laggy if the image is big.
Examples of what can be done:
I'm not a communist, it was just an image file I had in my computer and wanted to test it with.
Any problems let me know.
Edits:
1. Added an example made by darkstar.
2. Fixed the example made by darkstar.
3. Added the preview example.