Skip to content

PHP Warning: ExcelSheet::addPictureDim() expects exactly 5 parameters, 7 given #120

@JatinChimote

Description

@JatinChimote

Hi,
I am not sure if this is a bug or not. Not sure where to put this :
I am using the addPictureDim function to add a image and move it slightly in x and y direction.
As per the documentation

/**
* Insert a picture into a cell with given dimensions
*
* @see ExcelBook::addPictureFromString()
* @see ExcelBook::addPictureFromFile()
* @see ExcelSheet::addPictureScaled()
* @param int $row 0-based row number
* @param int $column 0-based column number
* @param int $picture_id Value returned by ExcelBook::addPictureFrom*() methods
* @param int $width
* @param int $height
* @param int $x_offset (optional, default=0)
* @param int $y_offset (optional, default=0)
* @return void
*/
public function addPictureDim($row, $column, $picture_id, $width, $height, $x_offset = 0, $y_offset = 0)
{
} // addPictureDim

However, when I call the function in My code

// Get the Picture Id
$picture_id = $book->addPictureFromFile($imageInfo['path']);

// Add the Picture. Note Offset 1,3 should be added bu throws an warning: Bug in php_excel ?
$sheet->addPictureDim($locationArr[0], $locationArr[1], $picture_id, $imageInfo['width'], $imageInfo['height'], 1, 3);

I get the following Warning

 PHP Warning:  ExcelSheet::addPictureDim() expects exactly 5 parameters, 7 given in <path>

And the offset values do not move the image.
I am using libxl 3.6.1.1 (Unlicensed Version) and latest php_excel.
Please help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions