Skip to content
Snippets Groups Projects
Select Git revision
  • d2ca23b47775a65b7efe7bc5e8c66d2024eb38c7
  • main default
  • Hayat2
  • branch_aichatou
  • Hayat
5 results

PatientRegisterController.java

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    Invert.java 475 B
    /**
     * Created by Arnaud Labourel on 04/10/2018.
     */
    public class Invert implements Transform{
        @Override
        public void applyTo(GrayImage image) {
            for(int x = 0; x < image.getWidth(); x++) {
                for (int y = 0; y < image.getHeight(); y++) {
                    modifyPixel(image, x, y);
                }
            }
        }
    
        private void modifyPixel(GrayImage image, int x, int y) {
            image.setPixel(image.getPixelGrayColor(x, y).invert(), x, y);
        }
    }