Forum


Replies: 1   Views: 3902
Addimage()-exception: image format is not supported when adding windows bitmap.
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by slichtenberg  · 18-11-2014 - 16:41

When I try the following operation: $options = array( 'src' => "./img_actual.bmp", 'imageAlign' => 'center', 'scaling' => 50, 'spacingTop' => 10, 'spacingBottom' => 0, 'spacingLeft' => 0, 'spacingRight' => 20, 'textWrap' => 0, 'borderStyle' => 'lgDash', 'borderWidth' => 6, 'borderColor' => 'FF0000', ); $wordImage = new WordFragment($this->_docx, 'document'); $wordImage->addImage($options); phpdocx throws following error: Fatal error: Uncaught exception 'Exception' with message 'Image format is not supported.' in \resources\inc\phpdocx\classes\AutoLoader.inc(62) : eval()'d code on line 55 although the API-Doc states it should be possible to use bmp-images (http://www.phpdocx.com/api-documentation/word-content/insert-image-Word-document-with-PHP). Is it because I'm using the test version of phpdocx? I'm currently evaluating the features we need for our actual project. Thank You very much for Your help.

Posted by admin  · 19-11-2014 - 09:08

Hello, Please use JPG, PNG or GIF, BMP has some issues working with the library. Regards.