com.github.ojil.algorithm.Gray8Unsigned2Signed Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ojil-core Show documentation
Show all versions of ojil-core Show documentation
Open Java Imaging Library.
package com.github.ojil.algorithm;
import com.github.ojil.core.Error;
import com.github.ojil.core.Gray8Image;
import com.github.ojil.core.Image;
import com.github.ojil.core.PipelineStage;
public class Gray8Unsigned2Signed extends PipelineStage {
public void push(Image imageInput) throws Error {
if (!(imageInput instanceof Gray8Image)) {
throw new Error(Error.PACKAGE.ALGORITHM,
ErrorCodes.IMAGE_NOT_GRAY8IMAGE, imageInput.toString(),
null, null);
}
Gray8Image gray = (Gray8Image) imageInput;
Byte[] rb = gray.getData();
for (int i=0; i
© 2015 - 2024 Weber Informatics LLC | Privacy Policy