Hi, I use the CropImage function to insert an image from a file into a container field,
Base64Decode ( Base64Encode ( CropImage( $importpath ; myTable::img_X ; myTable::img_Y ; myTable::img_pic_width ; myTable::img_pic_height ) ) ; myTable::img_destination_fieldname )
It works perfectly but, if the XY coordinates are negatives, the background that fills the empty space is set automatically to black.
Ex:
Base64Decode ( Base64Encode ( CropImage( $importpath ; -200 ; -75 ; 500 ; 250 ) ) ; myTable::img_destination_fieldname )
https://punto-rosso.d.pr/GHn8Vv
I use negative coordinates to position the picture inside the container.
How I can avoid the black background? Or at least set it to white/transparent.
Thanks
Small update: the problem exist even with positive values. Ex.
Base64Decode ( Base64Encode ( CropImage( $importpath ; 25 ; 100; 500 ; 250 ) ) ;myTable::img_destination_fieldname )
https://punto-rosso.d.pr/u505b6
It seems that the Crop function simply add automatically a black background to fill any empty space.