Skip to content

Flipped images returns to original flip #731

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
saulens22 opened this issue Oct 22, 2018 · 3 comments · Fixed by #3801
Closed

Flipped images returns to original flip #731

saulens22 opened this issue Oct 22, 2018 · 3 comments · Fixed by #3801

Comments

@saulens22
Copy link

saulens22 commented Oct 22, 2018

This is:

- [x] a bug report
- [ ] a feature request
- [x] **not** a usage question (ask them on https://stackoverflow.com/questions/tagged/phpspreadsheet or https://gitter.im/PHPOffice/PhpSpreadsheet)

What is the expected behavior?

PhpSpreadsheet should preserve image flip options.

What is the current behavior?

After saving file, images with flipping returns to default flip.

What are the steps to reproduce?

Please provide a Minimal, Complete, and Verifiable example of code that exhibits the issue without relying on an external Excel file or a web server:

<?php

require __DIR__ . '/vendor/autoload.php';

use PhpOffice\PhpSpreadsheet\IOFactory;
use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;

$reader = IOFactory::createReader('Xlsx');
$spreadsheet = $reader->load('input.xlsx');
$writer = IOFactory::createWriter($spreadsheet, "Xlsx");
$writer->save('output.xlsx');

Input:
image

Output:
image

Which versions of PhpSpreadsheet and PHP are affected?

PHP 7.2.11
PhpSpreadsheet 1.4.0, 1.4.1, 1.5.0

@stale
Copy link

stale bot commented Dec 21, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If this is still an issue for you, please try to help by debugging it further and sharing your results.
Thank you for your contributions.

@stale stale bot added the stale label Dec 21, 2018
@stale stale bot closed this as completed Dec 28, 2018
@saulens22
Copy link
Author

This is still an issue in version 1.29 / PHP 8.2

@oleibman
Copy link
Collaborator

There is currently no support for horizontal or vertical flip in the Drawing object. I will look into what needs to be done to support them.

@oleibman oleibman reopened this Nov 28, 2023
@stale stale bot removed the stale label Nov 28, 2023
oleibman added a commit to oleibman/PhpSpreadsheet that referenced this issue Nov 29, 2023
Fix PHPOffice#731. Opened over 5 years ago, probably the second oldest problem I've worked on. Images attached to an Xlsx spreadsheet can be rotated, which is supported by PhpSpreadsheet. They can also be flipped along their horizontal and/or vertical axes, and that has not been supported. This PR adds that support.
oleibman added a commit that referenced this issue Nov 30, 2023
* Xlsx Support Flipping of Image

Fix #731. Opened over 5 years ago, probably the second oldest problem I've worked on. Images attached to an Xlsx spreadsheet can be rotated, which is supported by PhpSpreadsheet. They can also be flipped along their horizontal and/or vertical axes, and that has not been supported. This PR adds that support.

* Update CHANGELOG.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants