Incorrect Image Aspect Ratio

Topics: Developer Forum, User Forum
Aug 3, 2012 at 7:24 PM

I'm using v1.7.6, exporting to Excel 5 format. 

My code is: 

$objDrawing = new PHPExcel_Worksheet_Drawing();
$objDrawing->setName('Logo');
$objDrawing->setDescription('Logo');
$objDrawing->setPath('images/test.jpg');
$objDrawing->setCoordinates('a1');

My Excel sheet exports beautifully, except that the image is distorted and way off its aspect ratio. I have unsuccessfully tried including things like: 

$objDrawing->setResizeProportional(true);
$objDrawing->setWidth(128);
$objDrawing->setHeight(128);

Along with other things, like changing image format, that sort of thing. Any ideas? Thanks in advance for the help...

Feb 26, 2013 at 9:27 PM
Hello, I see that you posted this in Aug 2012. I'm hoping that you have found a resolution for this problem. If so, could you please share it with me?