diff --git a/htdocs/comm/propal/apercu.php b/htdocs/comm/propal/apercu.php
index 3cc29a7bc6c..7ef62f9bbab 100644
--- a/htdocs/comm/propal/apercu.php
+++ b/htdocs/comm/propal/apercu.php
@@ -166,48 +166,24 @@ if ($_GET["id"] > 0)
{
if (class_exists("Imagick"))
{
- $image=new Imagick();
- $image->readImage($file) ;
-
- /*
- if ( imagick_iserror( $handle ) )
- {
- $reason = imagick_failedreason( $handle ) ;
- $description = imagick_faileddescription( $handle ) ;
-
- print "handle failed!
\nReason: $reason
\nDescription: $description
\n";
- }
- */
-
- $image->setImageFormat("PNG");
-
- /*
- if ( imagick_iserror( $handle ) )
- {
- $reason = imagick_failedreason( $handle ) ;
- $description = imagick_faileddescription( $handle ) ;
- print "handle failed!
\nReason: $reason
\nDescription: $description
\n";
- }
- */
-
- $image->writeImage($file.".png");
-
- }
- else
- {
- $langs->load("other");
- print ''.$langs->trans("ErrorNoImagickReadimage").'';
- }
+ $ret = dol_convert_file($file);
+ if ($ret < 0) $error++;
+ }
+ else
+ {
+ $langs->load("other");
+ print ''.$langs->trans("ErrorNoImagickReadimage").'';
}
}
-
- print "";
- print '';
-
- print '