Using your perl script I am getting the following error - DBD::SQLite::st execute failed: datatype mismatch: bind 5 type 1 as png at mapconvert line 80. Any workaround ?
$storeinsert->bind_param(6,$extension,SQL_INTEGER);
$storeinsert->bind_param(6,$stamp,SQL_INTEGER);