Utility: PngSizer - Resize PNG files without losing alpha transparency-VBForums
Results 1 to 2 of 2

Thread: Utility: PngSizer - Resize PNG files without losing alpha transparency

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Feb 2006
    Posts
    11,614

    Arrow Utility: PngSizer - Resize PNG files without losing alpha transparency

    Title

    PngSizer


    Description

    A small GUI utility for resizing PNG image files, typically icon images for use in your programs, without losing alpha channel information.

    Compiled EXE included in the attached archive.


    Features

    Drag and drop or copy and paste a file from a Windows Explorer instance. Then choose new dimensions and click Save.

    Can overwrite the original file, or create a new file in the same folder named with an inserted "-new" suffix.

    Can optionally run the PNGOUT.EXE utility upon saving if present in the same folder as PngSizer.exe itself. You can obtain the PNGOUT optimizer utility from the author's official web page:



    Screen-shots

    Name:  sshot1.jpg
Views: 127
Size:  24.0 KB

    Sample file folder.png dropped onto PngSizer, Half button clicked


    Name:  sshot2.jpg
Views: 103
Size:  34.2 KB

    Save clicked, PNGOUT run completed


    Author name

    Bob Riemersma


    System Requirements

    Run Time

    EXE requires Windows Vista or later (will run on Windows XP if the optional WIA 2.0 "WIAAUT" package has been installed).

    Optionally can make use of PNGOUT.EXE (see above for download page).

    Recompiling

    Windows Vista or later (or Windows XP with WIAAUT).

    VB 6.0 Professional or Enterprise.


    License info

    Public domain "freeware." Feel free to make any use of the program or its source code that you choose.

    The author accepts no liability for any negative consequences of the use of the compiled program or derivative works based on its source code.

    This is "as-is" software.


    Other remarks

    The main use for this program is to convert a larger sized PNG "icon" image with alpha channel transparency and translucency to a smaller more compact size for use in your own programs. This should reduce the final size of your programs even if you resize such images to fit at run time.

    Note that usually you won't want to resize down too far, unless you are targeting your exact final size. If your programs are doing run time resizing and alpha blending (e.g. for dealing with High DPI) you may want to avoid making your source images too small. A larger image preserves more definition from the original image, making your final images look a little better.

    The quality of the result may vary if you pixel-slice... for example a 256x256 image resized to 128x128 is pretty clean while 256x256 to 105x105 might result in excessive aliasing effects. Avoid this when using PngSizer to create smaller source images for use by your programs.

    The archive contains a sample PNG file (folder.png) for testing.

    The bulk of the code in PngSizer is either user interface management logic or code used to run the external PNGOUT.EXE utility when available. The amount of code to do the image resizing itself is actually pretty small, delegating the heavy lifting to WIA 2.0 objects.


    DFS - Drag-file source

    The attached archive also includes the source to the DFS helper utility.

    When you are testing within the VB6 IDE it should (as always) be running with elevated permission. Due to system process integrity rules drag and drop will not work with a non-elevated drag source (i.e. Windows Explorer). See Windows Vista Integrity Mechanism Technical Reference for more information.

    If you compile the DFS program ahead of time, you can use it for testing drag and drop with PngSizer running within the elevated IDE. Running DFS displays a listbox containing all of the PNG files in the directory it is running from (App.Path in VB6 terms). You can click one of these to select it, then click and drag it to the running PngSizer window.
    Attached Files Attached Files
    Last edited by dilettante; Nov 5th, 2014 at 11:42 PM. Reason: Reposted attachment (fixed small bug)

  2. #2

    Thread Starter
    PowerPoster
    Join Date
    Feb 2006
    Posts
    11,614

    Re: Utility: PngSizer - Resize PNG files without losing alpha transparency

    Note:

    While the included "folder.png" is NOT mine, it is marked "Creative Commons (Attribution 3.0 Unported)" at:

    Iconizer.net

    The README states:

    Shimmer Icons By: Creative Freedom Ltd
    License: Creative Commons (Attribution 3.0 Unported)
    Count: 21 Icon set page: http://www.creativefreedom.co.uk/icon-design
    Shimmer Icons - Free Set
    -------------------------------
    The 'Shimmer' Icon style is Windows 7 style variant, 20 unique icons are provided free for use in commercial or non-commercial applications, the designs may not be altered in any way and the following attribution must be used, including the link.

    http://www.creativefreedom.co.uk/icon-design/ - Icon Design by Creative Freedom
    All copyright for Shimmer Icons belongs to Creative Freedom Ltd.

    http://creativecommons.org/licenses/by-nd/3.0/
    -------------------------------
    Creative Freedom Ltd
    http://www.creativefreedom.co.uk/
    info@creativefreedom.co.uk
    +44 (0)1487 843 493
    The particular file under discussion is a folder image, and if you really need a smaller size you might go to the source and grab one of those made available there instead of resizing it.
    Last edited by dilettante; Nov 5th, 2014 at 01:35 PM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.