Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.9.4

Bug #2862 insertBitmap scales image incorrect in Excel 2000
Submitted: 2004-12-01 09:41 UTC
From: thomas dot keller at inatec dot com Assigned:
Status: Verified Package: Spreadsheet_Excel_Writer
PHP Version: 4.3.4 OS: RH9
Roadmaps: (Not assigned)    
Subscription  


 [2004-12-01 09:41 UTC] thomas dot keller at inatec dot com
Description: ------------ In Excel 2000 a bitmap is always scaled incorrectly if it is inserted via insertBitmap (and no scale/ position attributes), regardless where I put the image. The author of _positionImage in Worksheet.php notes that "the SDK incorrectly states that the height should be expressed as a percentage of 1024." thus uses for the height a value of only 256. I changed these values to 1024 which made the insert work correctly for me. Reproduce code: --------------- $file = "/path/to/file/bitmap.bmp"; $worksheet->insertBitmap(0, 0, $file);

Comments

 [2006-03-01 12:31 UTC] roh at m3 dot net (Rob Hunter)
The scaling is visibly off in Excel 2003, as well, but I didn't have much luck using a factor of 1024 instead of 256. If my calling code uses a scale of (1, 0.8) to mean (1, 1), I get acceptable results.
 [2009-11-29 07:06 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!