0

I am trying to mask sensitive information such as Name, Email, Mobile Number, Address, DOB from an image / scanned copy of an application using PHP.

Tried using http://image.intervention.io/

<?php
// include composer autoload
require 'vendor/autoload.php';

use Intervention\Image\ImageManager;

$sampleImagePath = 'images/sample-1.png';
$maskedImagePath = 'images/alpha.png';
$outputImagePath = 'output/sample-1.png';

try {

    $manager = new ImageManager(array('driver' => 'imagick'));

    $image = $manager->make($sampleImagePath);

    $image->insert($maskedImagePath, "top-left", 70, 50)->opacity(100);

    $image->save($outputImagePath);
} catch (Exception $ex) {
    var_dump($ex->getMessage());
    exit;
}
?>

but identifying particular field coordinates, width and height are getting difficult as the user could have captured images from different angles.

Looking for suggestions from experts to achieve this.

Anoop Pete
  • 492
  • 2
  • 4
  • 17

0 Answers0