Skip to content
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

Fix Flipped for libpng Extension Saving #1728

Merged
merged 2 commits into from May 18, 2019

Conversation

RobertBColton
Copy link
Contributor

@RobertBColton RobertBColton commented May 17, 2019

I ran onto this while working on #1725 and hugar also mentioned it to me and on the forums at the same time. The libpng extension was not respecting the flipped parameter when saving. The reason is because we were flipping both the source read and destination write indices, where one obviously undoes the other. We only need to flip one of the indexes, not both. The one we should flip is the destination write index, since it is bounded by height, where the source read index is bounded by fullheight.

@RobertBColton RobertBColton added Confirmed The issue has been confirmed as existing by another user or contributor. Reproducible Can be triggered determininistically by a discrete series of steps. Graphics Game visuals including render state, geometry pipeline, rasterization, and related assets. Bug Issues that are non fatal and occur at run time or compile time. Extensions Official ENIGMA extensions or GameMaker extensions and external libraries. Universal System Resource storage and other logic universal to more than one system or extension. labels May 17, 2019
@JoshDreamland
Copy link
Member

It may be time to consider deleting this file. We have smarter, more up-to-date PNG read/write logic elsewhere throughout the project.

@codecov
Copy link

codecov bot commented May 18, 2019

Codecov Report

Merging #1728 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1728      +/-   ##
==========================================
- Coverage   24.67%   24.66%   -0.01%     
==========================================
  Files         166      166              
  Lines       16590    16588       -2     
==========================================
- Hits         4094     4092       -2     
  Misses      12496    12496
Impacted Files Coverage Δ
.../Universal_System/Extensions/libpng/libpng-ext.cpp 93.61% <100%> (-0.27%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 23f7f5b...4f78645. Read the comment docs.

@RobertBColton
Copy link
Contributor Author

Yes, we can take a look at that later. It seems we are actually using the libpng-util you speak of, but doing additional cropping and flipping. We have a universal helper for that already, image_flip. I don't feel like getting too involved with this right now, we can come back to it later.

@RobertBColton RobertBColton merged commit 8f17fde into master May 18, 2019
@RobertBColton RobertBColton deleted the libpng-ext-flipped-save-fix branch May 18, 2019 03:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues that are non fatal and occur at run time or compile time. Confirmed The issue has been confirmed as existing by another user or contributor. Extensions Official ENIGMA extensions or GameMaker extensions and external libraries. Graphics Game visuals including render state, geometry pipeline, rasterization, and related assets. Reproducible Can be triggered determininistically by a discrete series of steps. Universal System Resource storage and other logic universal to more than one system or extension.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants