pngtastic | A pure Java PNG image optimization and manipulation library | Compression library

 by   depsypher Java Version: 1.7 License: MIT

kandi X-RAY | pngtastic Summary

kandi X-RAY | pngtastic Summary

pngtastic is a Java library typically used in Utilities, Compression applications. pngtastic has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has low support. You can download it from GitHub, Maven.

Pngtastic is PNG for Java. Just one small jar with no dependencies. It doesn't rely on AWT, so it can be used in restrictive environments like Google App Engine (and probably Android, but haven't tried). The latest code adds the ability to optimize png images using the new zopfli deflate compression algorithm. The java port is based heavily on this. If you're willing to sacrifice compression speed in exchange for ridiculously good compression ratios, you'll want to try using the optional zopfli compressor. So far I'm seeing better compression ratios for my test images than even the excellent ImageOptim app produces.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              pngtastic has a low active ecosystem.
              It has 161 star(s) with 32 fork(s). There are 19 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 6 open issues and 10 have been closed. On average issues are closed in 43 days. There are 2 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of pngtastic is 1.7

            kandi-Quality Quality

              pngtastic has 0 bugs and 0 code smells.

            kandi-Security Security

              pngtastic has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              pngtastic code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              pngtastic is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              pngtastic releases are not available. You will need to build from source code and install.
              Deployable package is available in Maven.
              Build file is available. You can build the component from source.
              Installation instructions are not available. Examples and code snippets are available.
              pngtastic saves you 2406 person hours of effort in developing the same functionality from scratch.
              It has 5702 lines of code, 339 functions and 46 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed pngtastic and discovered the below as its top functions. This is intended to give you an instant insight into pngtastic implemented functionality, and help decide if they suit your requirements.
            • Main method for testing
            • Compress a single file
            • Read a buffer of bytes into a byte array
            • Create a new png image
            • Process the head chunk
            • Perform the base and layering
            • Encodes the given raw byte buffer into the given output buffer
            • Encodes the given ByteBuffer to the given character buffer
            • De - filter input
            • Returns the probability of the pth line
            • Decode the given data to a file
            • Encode data to a file
            • Closes this output stream
            • Decodes a binary file into a file
            • Encodes a file into a base64 string
            • Compares two pixels
            • Deleting image
            • Cache the distance symbols
            • Prepare and return an array of DistCacheExtra bits
            • Insert the given chunk into the image
            • Flushes the compressed stream
            • Applies filters to the image
            • Main entry point for testing purposes
            • Main entry point
            • Counts the number of pixels in the image
            • Entry point for the program
            Get all kandi verified functions for this library.

            pngtastic Key Features

            No Key Features are available at this moment for pngtastic.

            pngtastic Examples and Code Snippets

            No Code Snippets are available at this moment for pngtastic.

            Community Discussions

            Trending Discussions on pngtastic

            QUESTION

            PNG format images do not display on Mac Safari
            Asked 2018-Jan-10 at 00:44

            Images from our website do not display in Safari for some Mac users and they report seeing either no image or a black image. Here is an example:

            http://s3-eu-west-2.amazonaws.com/bp18.boxcleverpress.com/Boxclever_logo_chartreuse.png

            What I have discovered is:

            • Images display on PC
            • Images display on SOME Macs (I have an older one that is OK)
            • Images display on iPhones and iPads
            • Images are PNG
            • I have optimised the images with pngtastic
            • When images are copied to the Mac and opened with Adobe Photoshop they give the error: the file format module cannot parse the file
            • When I tried to open a pngtastic optimised file in Photoshop Elements on Windows I also get that error
            • When I tried to open the optimised file in Photoshop on Windows I get the error IDAT: incorrect data check

            I will replace the optimised images with unoptimised ones but I am not sure if this problem is with pngtastic or Adobe image libraries or something else.

            ...

            ANSWER

            Answered 2018-Jan-09 at 11:31

            The problem appears to be due to the use of the zopfli compression in the PNGs that I optimised using pngtastic. The workaround is to use a different pngtastic compression option and the PNGs are then readable in Photoshop.

            Using a different compression algorithm will result in less optimisation.

            I am not sure why the zopfli compression is a problem, it could be that there is a fault in my code (although the same code works fine when only the zopli option is changed), in pngtastic, or that MacOS and Adobe don't support zopfli.

            @usr2564301 has done some investigation and it appears the Adler-32 checksum on the compressed data in my example image is incorrect. usr2564301 has also tested the pngtastic code and found it to produce the correct checksum. The problem might be in how I handle the bytestream out of pngtastic.

            The code below performs the PNG optimisation using pngtastic (com.googlecode.pngtastic.core)

            Source https://stackoverflow.com/questions/43526442

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install pngtastic

            You can download it from GitHub, Maven.
            You can use pngtastic like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the pngtastic component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
            Maven
            Gradle
            CLONE
          • HTTPS

            https://github.com/depsypher/pngtastic.git

          • CLI

            gh repo clone depsypher/pngtastic

          • sshUrl

            git@github.com:depsypher/pngtastic.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Reuse Pre-built Kits with pngtastic

            Consider Popular Compression Libraries

            zstd

            by facebook

            Luban

            by Curzibn

            brotli

            by google

            upx

            by upx

            jszip

            by Stuk

            Try Top Libraries by depsypher

            jarzilla

            by depsypherJava

            flapjack

            by depsypherJava

            morbok

            by depsypherJava

            scratchpad

            by depsypherJava

            chkyrslf

            by depsypherJava