[DEBUG] correct the transformatiuon in float image

This commit is contained in:
Edouard DUPIN 2021-05-24 13:51:29 +02:00
parent 46642ec725
commit 5186fb115e

View File

@ -26,9 +26,9 @@ public class ToolImage {
return out;
}
public static ImageByte convertImageFloat(final ImageByte input) {
public static ImageFloat convertImageFloat(final ImageByte input) {
if (input.hasAlpha()) {
ImageByte out = new ImageByteRGBA(input.getHeight(), input.getWidth());
ImageFloat out = new ImageFloatRGBA(input.getHeight(), input.getWidth());
for (int xxx = 0; xxx < input.getWidth(); ++xxx) {
for (int yyy = 0; yyy < input.getHeight(); ++yyy) {
out.setRFloat(xxx, yyy, input.getRFloat(xxx, yyy));
@ -39,7 +39,7 @@ public class ToolImage {
}
return out;
}
ImageByte out = new ImageByteRGB(input.getHeight(), input.getWidth());
ImageFloat out = new ImageFloatRGB(input.getHeight(), input.getWidth());
for (int xxx = 0; xxx < input.getWidth(); ++xxx) {
for (int yyy = 0; yyy < input.getHeight(); ++yyy) {
out.setRFloat(xxx, yyy, input.getRFloat(xxx, yyy));