French xResizeAndCrop1 on Raspberry

CR95

Active Member
Licensed User
@klaus
I am using your library to compress huge photos before showing them. I play with the quality parameter as explained in #12 of the presentation of your library :
https://www.b4x.com/android/forum/threads/b4x-xui-xresizeandcrop.100109/

It works fine under Windows.
But I get this error under Debian on Raspberry : java.lang.NoClassDefFoundError: javafx/embed/swing/SwingFXUtils

It seems that JavaFx is not installed with the Debian system. Is it possible to solve that ?

If yes, I have other demands :
- the xResizeAndCrop1.LoadImage shows an image with rounded corners. Is it possible to keep original corners ?
- is it possible to know the size (not the height and width) of the image in order to decide to compress it ?
- and is it possible to "work only in memory" : load the image -> compress it in Jpeg -> show it ?

Thanks for your help
 

klaus

Expert
Licensed User
Longtime User
But I get this error under Debian on Raspberry : java.lang.NoClassDefFoundError: javafx/embed/swing/SwingFXUtils
I have never used a Raspberry. The WriteToStream method is a B4XBitmap method.
I am afraid that only Erel could help with this problem.

the xResizeAndCrop1.LoadImage shows an image with rounded corners. Is it possible to keep original corners ?
The LoadImage method loads the image as it is, it does not add any corner radii.
Are you speaking of the display of the original image or the cropped image.
If it is the cropped image, this means that you have set corner radii somewhere.

is it possible to know the size (not the height and width) of the image in order to decide to compress it ?
Maybe this library could help.

and is it possible to "work only in memory" : load the image -> compress it in Jpeg -> show it ?
I do not think so. The jpeg compression is made to decrease the size of a file, therefore the intermediate file.
But it could probably be done with the BitmapCreator library, I have never tried it.
 
Top