[Help] Resize Mob Libs

bansheemir.com

Win

Elite Mir 2 - Coming Soon
Aug 13, 2020
32
25
20
Does anyone know of any easy ways to reduce a mob & placements by for example 20% without resizing every image individually and manually re-doing all the placements?

For example, can the Microsoft Image Processor be used to reduce them by a % in the code to make the process quicker?
 
Your banner could be here!
Join Our Discord

Win

Elite Mir 2 - Coming Soon
Aug 13, 2020
32
25
20
When you're dealing in pixels, I doubt doing something by percent would be much use.
Image = 100 x 100 / 100% x 100%
Placement = X / Y = -50, -50 (Centre)

Resize image by 25%
Image = 75 x 75 / 75% x 75% (Now the new 100%)
Placement = -50 * 0.75 (25%) = 37.5 x 37.5 (Still centre) << will be rounded up to 38 x 38 (whole numbers required)

Percentage works exactly as it should for placements and image resizing.

If anyone wants to resize placements then you do the following:

Within your LibEditor LMain.cs you need to edit the INSERT function at LINE 551 so that it automatically resizes your placements when inserting new images.

Add in the highlighted code and change the image, xx, yy so it's outputting the new variables.

1651659427192.png

- LibEditor needs the removeBlack fixing on the AddImage, which only currently works on INSERT.

If anyone knows how to add a section of code in this to also resize the Bitmap image within this section in the same way, it would be massively appreciated..

What would be even cooler is if the LibEditor had a % textbox that is used as the variable to decide how much the file needs to be resized upon import..
 
Upvote 0