Added settings for the compression size of image

Signed-off-by: Andrea Cappelli <a.cappelli87@gmail.com>
Added msgId to resizeImage()

Signed-off-by: Andrea Cappelli <a.cappelli87@gmail.com>