Blueforcer Well-Known Member Licensed User Longtime User Nov 28, 2018 #1 I need to get the Pixelcolors of a 8x8 PNG or BMP. (i think BMP could be easier) unfortunately all function ive found based on javaFX like https://www.b4x.com/android/forum/threads/get-image-pixels.91666/#content Is there a solution to do this without jfx? Last edited: Nov 28, 2018
I need to get the Pixelcolors of a 8x8 PNG or BMP. (i think BMP could be easier) unfortunately all function ive found based on javaFX like https://www.b4x.com/android/forum/threads/get-image-pixels.91666/#content Is there a solution to do this without jfx?
techknight Well-Known Member Licensed User Longtime User Nov 28, 2018 #2 Me too. But for a very different reason. Upvote 0
stevel05 Expert Licensed User Longtime User Nov 28, 2018 #3 java awt has a PixelGrabber class, I don't know how to use it myself but I'm sure you can work it out with a bit of investigation. https://docs.oracle.com/javase/7/docs/api/java/awt/image/PixelGrabber.html Upvote 0
java awt has a PixelGrabber class, I don't know how to use it myself but I'm sure you can work it out with a bit of investigation. https://docs.oracle.com/javase/7/docs/api/java/awt/image/PixelGrabber.html
Erel B4X founder Staff member Licensed User Longtime User Nov 29, 2018 #4 The best option to extract pixels from a bitmap is with BitmapCreator. BitmapCreator does rely on JavaFX however it might work in a non-ui project. You should try it. Upvote 0
The best option to extract pixels from a bitmap is with BitmapCreator. BitmapCreator does rely on JavaFX however it might work in a non-ui project. You should try it.
Blueforcer Well-Known Member Licensed User Longtime User Nov 29, 2018 #5 I cant use any JavaFX related function Upvote 0
DonManfred Expert Licensed User Longtime User Nov 29, 2018 #6 Blueforcer said: I cant use any JavaFX related function Click to expand... you did read @Erel answer above yours? Upvote 0
Blueforcer said: I cant use any JavaFX related function Click to expand... you did read @Erel answer above yours?
Blueforcer Well-Known Member Licensed User Longtime User Nov 29, 2018 #7 of course. he said "BitmapCreator does rely on JavaFX" But because i cant install javaFX or openjfx on my platform, i cant use it. Even if i just use the type paint it throws an exeption "noClassDefFoundError" With BitmapCreator the error is: java.lang.NoClassDefFoundError: javafx/scene/Node Upvote 0
of course. he said "BitmapCreator does rely on JavaFX" But because i cant install javaFX or openjfx on my platform, i cant use it. Even if i just use the type paint it throws an exeption "noClassDefFoundError" With BitmapCreator the error is: java.lang.NoClassDefFoundError: javafx/scene/Node
DonManfred Expert Licensed User Longtime User Nov 29, 2018 #8 Ohh, MY fault! I DID not read correctly :-( Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Nov 29, 2018 #9 Blueforcer said: But because i cant install javaFX or openjfx on my platform Click to expand... Which platform? Upvote 0
Blueforcer said: But because i cant install javaFX or openjfx on my platform Click to expand... Which platform?
Blueforcer Well-Known Member Licensed User Longtime User Nov 29, 2018 #10 Its my NAS. The JRE is a thirdparty port, but without JavaFX. Maybe its possible to read the bytes from a raw BMP and convert it back to its colors? I dont know Last edited: Nov 29, 2018 Upvote 0
Its my NAS. The JRE is a thirdparty port, but without JavaFX. Maybe its possible to read the bytes from a raw BMP and convert it back to its colors? I dont know
Erel B4X founder Staff member Licensed User Longtime User Nov 29, 2018 #11 Blueforcer said: Maybe its possible to read the bytes from a raw BMP and convert it back to its colors? Click to expand... It is possible. It is not too complicated if you use the 32 bit format. Example of writing a BMP file: https://www.b4x.com/android/forum/threads/b4x-convert-bitmap-to-bmp-format.94420/#content Upvote 0
Blueforcer said: Maybe its possible to read the bytes from a raw BMP and convert it back to its colors? Click to expand... It is possible. It is not too complicated if you use the 32 bit format. Example of writing a BMP file: https://www.b4x.com/android/forum/threads/b4x-convert-bitmap-to-bmp-format.94420/#content