Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

--TEST-- Test Imagick, adaptiveThresholdImage --SKIPIF-- <?php $imageMagickRequiredVersion..

Decoded Output download

--TEST--
Test Imagick, adaptiveThresholdImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc'); 
?>
--FILE--
<?php

$width = 50;
$height = 20;
$adaptiveOffset = 0.125;

function adaptiveThresholdImage($width, $height, $adaptiveOffset) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $adaptiveOffsetQuantum = intval($adaptiveOffset * \Imagick::getQuantum());
    $imagick->adaptiveThresholdImage($width, $height, $adaptiveOffsetQuantum);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

adaptiveThresholdImage($width, $height, $adaptiveOffset) ;
echo "Ok";
?>
--EXPECTF--
Ok

Did this file decode correctly?

Original Code

--TEST--
Test Imagick, adaptiveThresholdImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc'); 
?>
--FILE--
<?php

$width = 50;
$height = 20;
$adaptiveOffset = 0.125;

function adaptiveThresholdImage($width, $height, $adaptiveOffset) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $adaptiveOffsetQuantum = intval($adaptiveOffset * \Imagick::getQuantum());
    $imagick->adaptiveThresholdImage($width, $height, $adaptiveOffsetQuantum);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

adaptiveThresholdImage($width, $height, $adaptiveOffset) ;
echo "Ok";
?>
--EXPECTF--
Ok

Function Calls

dirname 1

Variables

$imageMagickRequiredVersion 1653

Stats

MD5 ab362477502d816f271f09598b1c1fe2
Eval Count 0
Decode Time 100 ms