Giter VIP home page Giter VIP logo

pngcs's People

Contributors

leonbloy avatar

pngcs's Issues

ImageLineHelper.ToARGB8

ImageLineHelper?.cs in methods ToARGB8(int, int, bool) and ToARGB8(byte, int, 
bool): The expressions with and without the alpha channel seems to be 
exchanged, so it doesn't return the alpha channel for alpha channel images and 
give IndexOutOfRangeException? for non-alpha images when you try to get the 
last pixel of the line.

Reported in comments
https://code.google.com/p/pngcs/wiki/Comments

Original issue reported on code.google.com by [email protected] on 5 Jul 2013 at 2:54

Alpha channel not detected

What steps will reproduce the problem?

On the image attached, the transparency is not detected in an Unity 3.5 
application (compiled with Mono-Develop Unity on MacOSX 10.7.5 or with Visual 
Studio on Windows 7).
The transparency is not detected either when building and running the 
MainProgram.cs provided with the revision pngcs-25ae2a736db5 on Windows7, the 
output images don't have transparency.

What is the expected output? What do you see instead?
expected : Images with transparency
what I get : the correct images without transparency (alpha channel replaced 
with white color)

What version of the product are you using? On what operating system?
pngcs-25ae2a736db5, MacOS 10.7.5 & Windows7

see attached images (original and outputs)

Original issue reported on code.google.com by [email protected] on 29 Jan 2013 at 4:04

Attachments:

GPL licence?

Would it be possible to replace the SharpZipLib source with source from 
DotNetZipLib so that this software can be licensed under the MIT or Apache 
license? GPL for a library makes it pretty much useless in the .NET world... 

I'd love to use this library, but I need LGPL or better to make it work, since 
I release under the MIT license.

Original issue reported on code.google.com by [email protected] on 4 Jan 2012 at 6:22

IDAT chunk deflated data direct access

Would it be possible to access directly the bytes part of one or multiple 
chunks such as IDAT? I can't find any example about obtaining PNG DATA without 
inflating process applied.

I find your library very useful, but I need some example and/or guidance about 
this topic. A workaround would also suffice in this case.

Thank you in advance for your suggestions.

Best regards.

Tez.

Original issue reported on code.google.com by [email protected] on 27 Mar 2012 at 10:54

Small patch to fix building with MonoDevelop.

Hello,

I've tried to build Pngcs with MonoDevelop on Linux.

Got a bunch of errors like: "Type of conditional expression cannot be 
determined as 'byte' and 'int' convert implicitly to each other".

It is the same problem as discussed at 
http://stackoverflow.com/questions/5524968/type-of-conditional-expression-cannot
-be-determined-as

There are just a few lines to be fixed, I've attached the patch.

---
WBR,
Andrey

Original issue reported on code.google.com by [email protected] on 31 Jul 2013 at 1:11

Attachments:

Improve docs

Migrate javadocs ( http://goo.gl/KqHs2 ), write wikis, and samples

Original issue reported on code.google.com by [email protected] on 11 Jun 2012 at 12:39

SetPixel for 16bpp

This is not a defect but an enhancement request.

While using the library I realized that a function to set 16bpp grayscale 
pixels is not available and the existing SetPixel() functions in 
ImageLineHelper.cs are based on an RGB model. So it doesn't work to use these 
with the same values for r,g, and b.

So I wrote my own and would kindly ask to add this to the code stack after a 
review by the gurus of this library.

My code is:

public static void SetPixel16bppGray(ImageLine line, int col, int gray)
{
    int offset = col * line.channels;
    if (line.IsInt())
    {
        line.Scanline[offset] = gray;
    }
    else
    {
        line.ScanlineB[offset++] = (byte)gray;
        line.ScanlineB[offset] = (byte)(gray >> 8);
    }
}

I hope this contribution is valuable.
Keep up the good work!

kr
Michael

Original issue reported on code.google.com by [email protected] on 5 May 2015 at 1:24

Incorrect library naming (pngcs.dll)

What steps will reproduce the problem?
1. add Pngcs45.dll to project
2. add reference to pngcs45.dll
3. implement library in code and start the program

What is the expected output? What do you see instead?
You will always get an exception, like:
"System.IO.FileNotFoundException?: The file or Assembly "Pngcs, 
Version=1.1.4.1, Culture=neutral, PublicKeyToken?=null" has not been found."

What version of the product are you using? On what operating system?
.NET 4.5 application, Visual Studio 2013

Please provide any additional information below.
The (simple) solution is to rename the library-file to pngcs.dll, after that 
you may have to re-add the reference (or do so before adding) and the 
application is running as expected and the library can be used.

Please change this in a future release and rename the file in the provided 
archive.
Otherwise, very well done!

Thanks

Original issue reported on code.google.com by [email protected] on 19 Jun 2015 at 1:41

Issues with Textual Chunks

【problem 1】
PngChunkTEXT.ParseFromRaw(ChunkRaw c) throws a exception, because the length of 
String[] k is 1,
where k[0] is "Software\\0Adobe....".

I modified the code, and it works well:

// Updated by Jerin@2012-11-28
//String[] k = 
Hjg.Pngcs.PngHelperInternal.charsetLatin1.GetString(c.Data).Split(new char[] { 
'\0' });
String[] k = Hjg.Pngcs.PngHelperInternal.charsetLatin1.GetString( c.Data 
).Split( new string[] { @"\0" }, StringSplitOptions.None );


【problem 2】
My scenario is to add/read a custom metadata of png.

I browsed samples of the project but found no way to read chunks only -- 
SampleCustomChunk/Program.cs/testRead(String file) gives an advice: call 
pngr.GetRow(pngr.ImgInfo.Rows - 1) first.

so i add a public method in PngReader class:

public void ReadChunksOnly() {
  if ( FirstChunksNotYetRead() )
    ReadFirstChunks();
  ReadLastChunks();
}




Thanks for your work very much!

Original issue reported on code.google.com by [email protected] on 28 Nov 2012 at 1:53

OpenFileForReading should perform Read-only access on file

By view point of parallelism, sometimes we access .png files by multiple 
threads simultaneously. Current pngcs implementation prevents things from 
working properly because OpenFileForReading method in FileHelper performs 
Read/Write (calling FileStream(String, FileMode) constructor without passing 
third argument; FileAccess, result in R/W access) and perform locks on files.

So, I propose applying the following patch on FileHelper.cs

-            isx = new FileStream(file, FileMode.Open);
+            isx = new FileStream(file, FileMode.Open, FileAccess.Read);

Original issue reported on code.google.com by [email protected] on 9 Nov 2013 at 10:39

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.