ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • Libpng Mac How To Download
    카테고리 없음 2021. 2. 22. 01:13


    1. Windows Libpng Dev

    Install Universal build libjpeg & libpng¶ pygame needs universal binaries to build right, but libpng and libjpeg sources don't build as universal binaries automatically. So you probably want to download the pre-built universal binaries for libpng & jpeg from ethan.tira-thompson.com. However you probably don't want to build against the dylib. Sep 01, 2017.

    Contents:

    13.1. A libpng-Based, PNG-Reading Demo Program
    13.2. Preliminaries
    13.3. readpng_init()
    13.4. readpng_get_bgcolor()
    13.5. Design Decisions
    13.6. Gamma and Color Correction
    13.7. readpng_get_image()
    13.8. readpng_cleanup()
    13.9. Compositing and Displaying the Image
    13.10. Getting the Source Code
    13.11. Alternative Approaches

    As with almost any kind of programming project, there are numerousalternatives one can take when writing a PNG-supporting program. Completeor partial code for reading and/or writing PNGs is available for the C, C++,Java, Pascal, tcl/tk, Python, and Visual Basic languages, at a minimum; someof it is in the form of commercial libraries, some as free source code, andsome as a combination of both. Many of these in alternatives are listed inChapter 16, 'Other Libraries and Concluding Remarks'.One can even read and write PNG images directly, in effect implementing one's own PNG library, but this is a rather large undertaking and isgenerally not recommended except under special circumstances.

    13.1. A libpng-Based, PNG-Reading Demo Program

    The back-end code was written for libpng version 1.0.3, but it should workwith any 1.x release of the library. Later releases of libpng may add newinterfaces, but the functions used here are expected to remain availablemore or less indefinitely, for backward compatibility. As for the front-endcode, two versions are currently available: one for the X Window System(rpng-x.c; mainly for Unix systems, but also potentially VMS and OS/2),and one for Windows 95/98 and NT (rpng-win.c). I will avoid gettinginto the details of these as much as possible, but where it is unavoidable,I will either use excerpts that are common to both or else point out thedifferences between the two versions. Complete source listings for bothflavors can be found at http://www.libpng.org/pub/png/pngbook.html.

    The basic PNG reader has the following features: it is file-based, itreads and displays a single image and then quits, and it is concernedonly with reading and decoding that image--it hasnothing better to do and can afford to wait on file input/output (I/O)and other potentially slow but non-CPU-intensive tasks. In otherwords, its characteristics are typical of standalone image viewers,converters, and many image editors, but not of web browsers. Browsersusually read from a network, which is often extremely slow compared todisk access (for example, due to limited modem bandwidth or justcongested Internet sites), and they are usually busy formatting textand decoding several images at the same time--they dohave something better to do than to wait for the rest of the file toshow up. I'll address these issues in Chapter 14, 'Reading PNG Images Progressively', with the second demo program.

    13.2. Preliminaries

    13.3. readpng_init()

    We can get away with using longs instead of unsignedlongs because the PNG specification requires that imagedimensions not exceed231 - 1.[99]readpng_init() returns a status value; zero will be used to indicatesuccess, and various nonzero values will indicate different errors.

    [99] Of course, an image with dimensions that big is likely to exhaust the realand virtual memory on most systems, but we won't worry about that here.

    [100] Other typedefs, such as uchar and u_char, are more commonand recognizable, but these are sometimes also defined by system header files.Unlike macros, there is no way to test for the existence of a C typedef, anda repeated or conflicting typedef definition is treated as an error by mostcompilers.

    The struct at which png_ptr points is used internally bylibpng to keep track of the current state of the PNG image at anygiven moment; info_ptr is used to indicate what its state willbe after all of the user-requested transformations are performed. Onecan also allocate a second information struct, usually referenced via anend_ptr variable; this can be used to hold all of the PNG chunkinformation that comes after the image data, in case it is important tokeep pre- and post-IDAT information separate (as in an image editor, which shouldpreserve as much of the existing PNG structure as possible). For thisapplication, we don't care where the chunk information comes from, so we will forego the end_ptrinformation struct and direct everything to info_ptr.

    One or both of png_ptr and info_ptr are used in all remaininglibpng calls, so we have simply declared them global in this case:

    Global variables don't work in reentrant programs, where the sameroutines may get called in parallel to handle different images, but thisdemo program is explicitly designed to handle only one image at a time.

    The Dark Side

    Let's take a brief break in order to make a couple of points aboutprogramming practices, mostly bad ones. The first is that oldversions of libpng (pre-1.0) required one to allocate memoryfor the two structs manually, via malloc() or a similar function. Download google hangouts for mac. This isstrongly discouraged now. The reason is that libpng continues to evolve,and in an environment with shared or dynamically linked libraries (DLLs),a program that was compiled with an older version of libpng may suddenlyfind itself using a new version with larger or smaller structs. Thepng_create_XXXX_struct() functions allow the version of the librarythat is actually being used to allocate the proper structs for itself,avoiding many problems down the road.

    The solution, which is already possible with current libpng releases andwill probably be required as of some future version, is to install a customerror handler. This is simply a user function that libpng calls instead ofits own longjmp()-based error handler whenever an error is encountered;like longjmp(), it is not expected to return. But there is no problemat all if the custom error handler itself calls longjmp(): sincethis happens within the application's own code space, its concept ofjmp_buf is completely consistent with that of the code that callssetjmp() elsewhere in the application. Indeed, there is no longer anyneed to use the jmpbuf element of the main libpng struct with thisapproach--the application can maintain its own jmp_buf.I will demonstrate this safer approach in Chapter 14, 'Reading PNG Images Progressively'.

    Once again, since this is a single-image program, I've been lazy andused global variables not only for the image dimensions but also forthe image's bit depth (bits per sample--R, G, B, A, or gray--orper palette index, not per pixel) and color type. The imagedimensions are also passed back to the main program via the last twoarguments of readpng_init(). The other two variables will beused later. If we were interested in whether the image is interlacedor what compression and filtering methods it uses, we would use actualvalues instead of NULLs for the last three arguments topng_get_IHDR(). Note that the PNG 1.0 and 1.1 specificationsdefine only a single allowed value (0) for either the compression typeor the filtering method. In this context, compression type 0 is thedeflate method with a maximum window size of 32 KB, and filteringmethod 0 is PNG's per-row adaptive method with five possible filtertypes. See Chapter 9, 'Compression and Filtering', for details.

    And guess what? You can also download the Android version of Amazon Prime Video for PC and Laptop. It is free, at least the basic features and you can easily install it on your handheld devices via. https://keencs757.weebly.com/amazon-prime-video-macos-app.html. Also, you can use Amazon Prime Video in over 200 countries and territories.

    That wraps up our readpng_init() function. Back in the main program,various things relating to the windowing system are initialized, but beforethe display window itself is created, we potentially make one more readpngcall to see if the image includes its own background color. In fact,this function could have been incorporated into readpng_init(),particularly if all program parameters used by the back-end readpng functionsand the front-end display routines were passed via an application-specificstruct, but we didn't happen to set things up that way. Also, note that thissecond readpng call is unnecessary if the user has already specified aparticular background color to be used. In this program, a simple command-lineargument is used, but a more sophisticated application might employ a graphicalcolor wheel, RGB sliders, or some other color-choosing representation.

    13.4. readpng_get_bgcolor()

    With that, the main program now has enough information to create animage window of the proper size and fill it with the background color,which it does. Thetop row of Figure C-5 inthe color insert showsthe two cases: the middle image is displayed with the background colorspecified in the PNG file itself, while the image on the right isshown with a user-specified background color.

    13.6. Gamma and Color Correction

    Since this routine is also where any gamma and color correction (recallChapter 10, 'Gamma Correction and Precision Color') would take place,we should step back a moment and look at howthe main program deals with that. First I have a confession: I did notattempt any color correction. (Truly, I am scum.) But this does notexcuse you, the reader, from supporting it, at least in higher-endapplications! The X Window System's base library, Xlib, has included theX Color Management System since X11R5; it is accessed via the Xcms functions,an extensive API supporting everything from color-space conversion to gamutcompression. Apple supports the ColorSync system on the Macintosh and willbe releasing a version for Windows. And Microsoft, if not already supportingthe sRGB color space natively in recent releases of Windows, certainly can beassumed to do so in coming releases; they and Hewlett-Packard collaborated onthe original sRGB proposal.

    In the new updated version of OS X Loin 10.7.5 now advanced interface-related feature included that is Mission Control, which has nothing to do with the iPad. It’s basically an iteration of Expose, the desktop-management tool that shrinks and spreads the applications all over the screen so users can switch between them easily. Download mac lion os x iso.

    The goal here is to make a reasonably well informed guess as to the overalldisplay system's exponent (``gamma'), which, as you'll recall from Chapter 10, 'Gamma Correction and Precision Color',is the product of the lookup table's exponent and that of the monitor. Essentially all monitors have an exponent of 2.2,so I've assumed that throughout. And almost all PCs and many workstationsforego the lookup table (LUT), effectively giving them a LUT exponent of 1.0;the result is that their overall display-system exponent is 2.2. This isreflected by the last line in the ifdef block.

    C++ libpng

    A few well-known systems have LUT exponents quite different from 1.0.The most extreme of these is the NeXT cube (and subsequent noncubic models),which has a lookup table with a 1/2.2 exponent, resultingin an overall exponent of 1.0 (i.e., it has a ``linear transfer function').Although some third-party utilities can modify the lookup table(with a ``gamma' value whose inverse is the LUT exponent, as on SGI systems),there appears to be no system facility to do so and no portable method ofdetermining what value a third-party panel might have loaded. So we assume1.0 in all cases when the NeXT-specific macro NeXT is defined. Submitted for review.

    Silicon Graphics workstations and Macintoshes also have nonidentity lookuptables, but in both cases the LUT exponent can be varied by system utilities.Unfortunately, in both cases the value is varied via a parameter called``gamma' that matches neither the LUT exponent nor the other system's usage.On SGI machines, the ``gamma' value is the inverse of the LUT exponent (ason the NeXT) and can be obtained either via a command (gamma) or froma system configuration file (/etc/config/system.glGammaVal); there isno documented method to retrieve the value directly via a system function call.Here we have used the file-based method. If we read it successfully, theoverall system exponent is calculated accordingly; if not, we assume thedefault value used on factory-shipped SGI systems: ``gamma' of 1.7, whichimplies a display-system exponent of 2.2/1.7, or 1.3. Note, however, thatwhat is being determined is the exponent of the console attached to the systemrunning the program, not necessarily that of the actual display. Thatis, X programs can display on remote systems, and the exponent of the remotedisplay system might be anything. One could attempt to determine whether thedisplay is local by checking the DISPLAY environment variable, but todo so correctly could involve several system calls (uname(),gethostbyname(), etc.) and is beyond the scope of this demo program.A user-level work-around is to set the SCREEN_GAMMA variableappropriately; I'll describe that in just a moment.

    The Macintosh ``gamma' value is proportional to the LUT exponent, but itis multiplied by an additional constant factor of 2.61. The default gammais 1.8, leading to an overall exponent of (1.8/2.61) × 2.2, or 1.5.Since neither of the two front ends (X or Windows) is designed to workon a Mac, the code inside the Macintosh if-def (and the Macintoshmacro itself) is intended for illustration only, not as a serious example ofready-to-compile code. Indeed, a standard component of Mac OS 8.5 is Apple'sColorSync color management system (also available as an add-on for earliersystems), which is the recommended way to handle both gamma and colorcorrection on Macs.

    It is entirely possible that the user has calibrated the display systemmore precisely than is reflected in the preceding code, or perhaps has a systemunlike any of the ones we have described. The main program also gives theuser the option of specifying the display system's exponent directly, eitherwith an environment variable (SCREEN_GAMMA is suggested by thelibpng documentation) or by direct input. For the latter, we have onceagain resorted to the simple expedient of a command-line option, but a moreelegant program might pop up a dialog box of some sort, or even provide acalibration screen. In any case, our main program first checks for theenvironment variable:

    If the variable is found, it is used; otherwise, the previously calculateddefault exponent is used. Then the program processes the command-line optionsand, if the -gamma option is found, its argument replaces all previously obtained values.

    That turned out to be a moderately lengthy explanation of the demo program'sapproach to gamma correction (or, more specifically, to finding the correctvalue for the display system's exponent), mostly because of all thedifferent ways the value can be found: system-specific educated guesses atthe time of compilation, system-specific files or API calls at runtime, anenvironment variable, or direct user input. The actual code is only about20 lines long.

    13.8. readpng_cleanup()

    13.9. Compositing and Displaying the Image

    13.10. Getting the Source Code

    13.11. Alternative Approaches

    This is an open source project to develop and maintain the referencelibrary for use in applications that read, create, and manipulate PNG(Portable Network Graphics) raster image files.

    UPDATE 2019-Apr-14:

    • The latest released version is
      • libpng-1.6.37
    • For legacy applications,
      • libpng-1.5.30
      • libpng-1.4.22
      • libpng-1.2.59
      • libpng-1.0.69
      are also available, and will be updated only if necessary for security reasons.

    UPDATE 2017-Sep-28: The latest development version is

    • libpng-1.7.0beta89

    libpng17has 8-bit compose and rgb_to_grayscale accuracy improvements, improved filterselection and compression strategies, and a new 'affirm' (similar to 'assert()')bug reporting system.

    The primary web site for PNG is www.libpng.org/pub/png.

    Libpng Mac How To Download

    The primary public ftp site for libpng is
    ftp://ftp-osl.osuosl.org/pub/libpng/src.
    This site will also respond to https and http requests:
    https://ftp-osl.osuosl.org/pub/libpng/src
    http://ftp-osl.osuosl.org/pub/libpng/src
    Thanks to the Oregon State University Open Source Laboratory.

    The previous ftp site is still being maintained atftp://ftp.simplesystems.org/pub/png, but theOSUOSL site is much faster and has a more complete archiveof old versions.

    The ftp site for beta versions of libpng is alsoat ftp://ftp-osl.osuosl.org/pub/libpng/src/beta

    The current public and beta versions of libpng are also available athttps://sourceforge.net/project/showfiles.php?group_id=5624.

    There are pointers to various distributions of libpng and MD5 checksumshere.

    You can receive notifications of libpng releases throughrelease-monitoring.org, atrelease-monitoring.org/projects/search/?pattern=libpng.

    The Sourceforge project page for libpng is athttps://sourceforge.net/projects/libpng/

    Get spotify premium for android free. A 'git' repository for libpng is available. Download java and eclipse mac. You can access it bycloning git://git.code.sf.net/p/libpng/code oryou can browse it atgithub.com/glennrp/libpng.or atsourceforge.net/p/libpng/code.At present, there are eight branches:

    • libpng00,
    • libpng10,
    • libpng12,
    • libpng14,
    • libpng15,
    • libpng16,
    • libpng17,and
    • master

    The 'master' branch is roughlyequivalent to the 'libpng16' branch. Development occurs in the 'libpng16'and 'libpng17' branches;parts of the new developments are also ported to the 'libpng15' branch; therest are just for legacy and security purposes.

    Secure Browser by Tropical Software is a web browsing tool that uses the latest security fixes to provide users with a safe and enjoyable browsing experience. Current releases don't contain a version of Secure Browser for Mac, but users can install other browsers that offer the same features. Avast Secure Browser is a free private browser designed to protect personal data and block ads for faster browsing. Free Antivirus for PC Free Security for Mac Free Security for Android Free Security for iPhone/iPad. Bookmarks, downloads, IP address, DNS queries, and more. Free unlimited VPN. Download secure browser for mac.

    A 'doxygen' index for various releases is available atfossies.org/libpng.

    An 'ABI compatibility analysis' of libpng releases is available atabi-laboratory

    The Coverity project for libpng is athttps://scan.coverity.com/projects/4061. The project is set up toscan the head of each of the libpng10 through libpng17 branches (libpng00is not included).

    The mailing list for libpng developers and developers of libpng-basedapplications is png-mng-implement (at) lists.sourceforge.net.Visithttp://png-mng.sourceforge.net/pub/png/pngmisc.html#lists to subscribe.(archived here)

    Bug reports can be sent to the mailing list or submitted via theSourceForge Bug tracker (select the 'Create Ticket' button) or as an issueat github.

    Libpng

    If you wish to privately report a security issue (vulnerability) in libpng,please report it by email to png-mng-security at lists.osuosl.org, whereit will be seen by a small group of long-time libpng contributors. You don'tneed to subscribe (in fact you probably won't be allowed to subscribe) tothat list.

    Windows Libpng Dev

    Feel free to download and use the official PNG logo(size 88x31) with your application documentation and webpages:





Designed by Tistory.