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

PCL profile 111 version of PNGCS #11

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

anders9ustafsson
Copy link

Dear Hernan,

Many thanks for an impressive work with this library!

Please find this pull request providing a separate solution containing a PCL profile 111 class library of pngcs, and a version of SamplesTests (.NET 4.5) that reference the PCL library.

Profile 111 means that the following platforms can be targeted:

  • .NET 4.5 and higher
  • Windows 8 and higher
  • Windows Phone 8.1 (non-Silverlight)
  • Xamarin Android
  • Xamarin iOS Unified API
  • Xamarin iOS Classic API

Thus, this pull request also resolves issue #4.

In all honesty, I have not been able to fully run the samples application, since I could not locate the test suite, so the PCL library is still untested.

The main differerence between the .NET (4.5) and the PCL library is that FileHelper has been omitted from the PCL project. A user of the PCL library thus have to replace the FileHelper calls with their platform equivalents when the PCL library is invoked.

I have made some bug fixes that are not related to PCL. I have as much as possible tried to make specific commits for each sub-issue, so it should be fairly straightforward from each individual commit which changes that have an impact on the original .NET project.

I have used compiler directive PORTABLE where I have found it useful to provide different implementations for the .NET-only and the PCL library.

Please let me know if you have any concerns with this pull request.

Thanks in advance!

Anders Gustafsson
Cureos AB

PS. The portable solution is intended for Visual Studio 2013 and higher. The cost-free Visual Studio 2013 Community version should be sufficient.

@devedse
Copy link

devedse commented Apr 30, 2016

Hi anders9ustafsson,

I was trying out your updates to the library but I'm running into the issue that all images appear black. Take for example this test using the test files included in the project:

SampleCreateOrange.Create("test.png", 500, 500);

Any clue why this could be?

@devedse
Copy link

devedse commented Apr 30, 2016

Ah I found the issue. In the Png.End method the Dispose function was called on the datDeflateStream. This however never calls the Close method internally (since it's not overriden from the Stream class).

After manually calling that close method it now works. This should be fixed a bit nicer though.

@devedse
Copy link

devedse commented May 1, 2016

#I fixed some issues on your code, please see my pull request :).

Fixed the writing issues for PNG and increased the max size of Png's because why have that?
kekekeks added a commit to kekekeks/pngcs that referenced this pull request Nov 26, 2018
more attached props intelisense
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants