Git Product home page Git Product logo

imagealpha's Introduction

ImageAlpha

ImageAlpha is a Mac OS X GUI for pngquant, pngnq and posterizer. These tools reduce filesize of PNG files while preserving the alpha channel.

ImageAlpha is written in Python and Cocoa (PyObjC).

Screenshot

Language Support

  • 中文简体 (Chinese Simplified) - Pluwen

imagealpha's People

Contributors

gemedet avatar jdorfman avatar kornelski avatar pichfl avatar pluwen avatar yukulele avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

imagealpha's Issues

Imagealpha not working in High Sierra

Hi and thank you for a fantastic app – I use it ever day.

I just upgraded to MacOS High Sierra, and ImageAlpha will no work. The app opens, but will not open the window where the image file usually goes.

Will there be support for High Sierra in the future?

All the best,
Magnus

Massive memory leak

Hello guys, enjoying your up — it saves a lot of space for my iOS projects.
But looks like you have a huge memory leak. I was optimizing big amount of PNG images today (~600). Each time I drag and drop a new image, the app starts to consume more and more memory. It ends up with 7GB consuming memory per ~300 images I noticed. Looks like some of your objects are not deallocated properly.
Hope it helps.

Regards,
George G.

Python/PyObjC program failed to start.

I am unable to get ImageAlpha to start, here is what I get when running from the CLI:

Traceback (most recent call last):
  File "main.py", line 20, in <module>
    import ImageAlphaDocument
  File "/Applications/ImageAlpha.app/Contents/Resources/ImageAlphaDocument.py", line 7, in <module>
    import IAImageView
  File "/Applications/ImageAlpha.app/Contents/Resources/IAImageView.py", line 11, in <module>
    class IAImageView(NSView):
objc.BadPrototypeError: Objective-C expects 1 arguments, Python argument has 2 arguments for <unbound selector _setZoom of IAImageView at 0x1107d2ed0>

pngquant doing nothing for days

Hi,

I'm using Jamie's ImageOptim that uses you ImageAlpha.
I processed lots of files with it : 180000 in 60000 batches, but my latest batch was stuck at the pngquant step for days, with pngaunt pegging the cpu up to 180%.

It does nothing as iosnooping it show no file activity, and no files are changed.

The fix was to change your embedded pngquant binary, by the latest 2.0.1 binary. Now it's ok.

However, I'm not sure that this 0.1 change is the cause of success (it's not documented in release notes), because in imageoptim 1.6.9 days I had the same issue. I thought image optim was the cure for it, and it was for a month, but now I encountered the issue again.

Error dragging png related to launch path

ImageAlpha[11280:1596665] *** Canceling drag because exception 'NSInvalidArgumentException' (reason 'must provide a launch path') was raised during a dragging session

Any idea? Hight Sierra

Background preview

  • Add full white and full black backgrounds
  • Add "custom background color" option
  • Add "custom background image" option

New from pasteboard

When hitting Cmd+N, ImageAlpha should automatically use the content from the pasteboard like Preview.app does.

Unable to start ImageAlpha

I'm not able to start the program anymore. This is the message I'm getting:

alpha

How to fix this issue? Thanks!

Error: Unable to start ImageAlpha

I receive the following message when tryign to start ImageAlpha:

Python/PyObjC program failed to start.
See Console.app for details.

Console.app has the following:

2/27/13 3:36:28.286 PM ImageAlpha[42235]: kCGErrorInvalidConnection: CGSGetCurrentCursorLocation: Invalid connection
2/27/13 3:37:25.528 PM com.apple.ShareKitHelper[41425]: --warning: [ShareKit-XPC] Received XPC_ERROR_CONNECTION_INVALID
2/27/13 3:37:25.529 PM com.apple.ShareKitHelper[41425]: --warning: [ShareKit-XPC] connectionWithClientInterrupted
2/27/13 3:37:25.529 PM com.apple.ShareKitHelper[41425]: --warning: [ShareKit] Cancel UI for running services with Client PID: 42235
2/27/13 3:37:25.532 PM com.apple.launchd.peruser.501[175]: ([0x0-0x159e59d].net.pornel.ImageAlpha[42235]) Exited with code: 255

I downloaded the following: http://pngmini.com/ImageAlpha1.2.5.1.tar.bz2

and am running OS X 10.8.2 on a MacBookPro Retina

Crash when switching tools

Noting bug report I've got via e-mail:

Have this error when open big sprite sheet and try to save it.

Process:         ImageAlpha [7978]
Path:            /Volumes/VOLUME/*/ImageAlpha_1.2.5.1.app/Contents/MacOS/ImageAlpha
Identifier:      net.pornel.ImageAlpha
Version:         1.2.5.1 (1.2.5.1)
Code Type:       X86-64 (Native)
Parent Process:  launchd [145]
User ID:         501
Date/Time:       2013-04-05 15:10:20.678 +0400
OS Version:      Mac OS X 10.8.3 (12D78)
Report Version:  10
Sleep/Wake UUID: 3801E841-E6D2-4C1C-B9BD-2835CABCC1EE
Interval Since Last Report:          413458 sec
Crashes Since Last Report:           10
Per-App Interval Since Last Report:  6769 sec
Per-App Crashes Since Last Report:   10
Crashed Thread:  0  Dispatch queue: com.apple.main-thread
Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: EXC_I386_GPFLT
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libobjc.A.dylib                 0x00007fff8d406498 objc_msgSend_vtable3 + 24
1   _objc.so                        0x000000010383a0cb pythonify_c_value + 617
2   _objc.so                        0x0000000103826e1c 0x103813000 + 81436
3   _objc.so                        0x0000000103836854 0x103813000 + 145492
4   org.python.python               0x0000000101ee14d5 PyEval_EvalFrameEx + 4936
5   org.python.python               0x0000000101ee0147 PyEval_EvalCodeEx + 1934
6   org.python.python               0x0000000101f19d7a 0x101ec9000 + 331130
7   org.python.python               0x0000000101ed86c6 PyObject_Call + 97
8   _objc.so                        0x00000001038436cf 0x103813000 + 198351
9   org.python.python               0x0000000101ed86c6 PyObject_Call + 97
10  org.python.python               0x0000000101ee278d PyEval_EvalFrameEx + 9728
11  org.python.python               0x0000000101ee0147 PyEval_EvalCodeEx + 1934
12  org.python.python               0x0000000101f19d7a 0x101ec9000 + 331130
13  org.python.python               0x0000000101ed86c6 PyObject_Call + 97
14  _objc.so                        0x00000001038436cf 0x103813000 + 198351
15  org.python.python               0x0000000101ed86c6 PyObject_Call + 97
16  org.python.python               0x0000000101ee278d PyEval_EvalFrameEx + 9728
17  org.python.python               0x0000000101ee0147 PyEval_EvalCodeEx + 1934
18  org.python.python               0x0000000101f19d7a 0x101ec9000 + 331130
19  org.python.python               0x0000000101ed86c6 PyObject_Call + 97
20  _objc.so                        0x00000001038436cf 0x103813000 + 198351
21  org.python.python               0x0000000101ed86c6 PyObject_Call + 97
22  org.python.python               0x0000000101ee278d PyEval_EvalFrameEx + 9728
23  org.python.python               0x0000000101ee0147 PyEval_EvalCodeEx + 1934
24  org.python.python               0x0000000101f19d7a 0x101ec9000 + 331130
25  org.python.python               0x0000000101ed86c6 PyObject_Call + 97
26  _objc.so                        0x0000000103828758 0x103813000 + 87896
27  libffi.dylib                    0x00007fff8f3948a6 ffi_closure_unix64_inner + 508
28  libffi.dylib                    0x00007fff8f393f66 ffi_closure_unix64 + 70
29  com.apple.CoreFoundation        0x00007fff9406aeda _CFXNotificationPost + 2554
30  com.apple.Foundation            0x00007fff8f60ce26 -[NSNotificationCenter postNotificationName:object:userInfo:] + 64
31  com.apple.Foundation            0x00007fff8f6cb11c _performFileHandleSource + 1280
32  com.apple.CoreFoundation        0x00007fff94037b31 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
33  com.apple.CoreFoundation        0x00007fff94037455 __CFRunLoopDoSources0 + 245
34  com.apple.CoreFoundation        0x00007fff9405a7f5 __CFRunLoopRun + 789
35  com.apple.CoreFoundation        0x00007fff9405a0e2 CFRunLoopRunSpecific + 290
36  com.apple.HIToolbox             0x00007fff9041eeb4 RunCurrentEventLoopInMode + 209
37  com.apple.HIToolbox             0x00007fff9041ec52 ReceiveNextEventCommon + 356
38  com.apple.HIToolbox             0x00007fff9041eae3 BlockUntilNextEventMatchingListInMode + 62
39  com.apple.AppKit                0x00007fff92d3d563 _DPSNextEvent + 685
40  com.apple.AppKit                0x00007fff92d3ce22 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128
41  com.apple.AppKit                0x00007fff92d341d3 -[NSApplication run] + 517
42  com.apple.AppKit                0x00007fff92cd8c06 NSApplicationMain + 869
43  _AppKit.so                      0x00000001042f8bbe 0x1042f6000 + 11198
44  org.python.python               0x0000000101ee25a9 PyEval_EvalFrameEx + 9244
45  org.python.python               0x0000000101ee0147 PyEval_EvalCodeEx + 1934
46  org.python.python               0x0000000101ee68df 0x101ec9000 + 121055
47  org.python.python               0x0000000101ee263a PyEval_EvalFrameEx + 9389
48  org.python.python               0x0000000101ee0147 PyEval_EvalCodeEx + 1934
49  org.python.python               0x0000000101edf9b3 PyEval_EvalCode + 54
50  org.python.python               0x0000000101f1bc70 0x101ec9000 + 339056
51  org.python.python               0x0000000101f1bd3c PyRun_FileExFlags + 165
52  org.python.python               0x0000000101f1b726 PyRun_SimpleFileExFlags + 410
53  net.pornel.ImageAlpha           0x0000000101ebfbb7 0x101ebe000 + 7095
54  net.pornel.ImageAlpha           0x0000000101ebf95c 0x101ebe000 + 6492

it permanently happens.

I just detect, it happens when i try to change from "Median cut" to "Neu Quant" and do not wait for calculating result about image compression press Save image, then app crash.

Image must me big: 8192x4096 pixels

Upgrade to `pngnq-s9 2.0.1`

The current pngnq has the following version information:

pngnq 1.1
   Compiled with libpng 1.5.14; using libpng 1.5.14.
   Compiled with zlib 1.2.5; using zlib 1.2.5.

However the ImageAlpha website claims "ImageAlpha can achieve better quality … by employing … pngnq-s9", despite the fact that the bundled binary identifies itself as:

pngnq 1.4.5
   Compiled with libpng 1.4.5-optipng; using libpng 1.4.5-optipng.
   Compiled with zlib 1.2.5; using zlib 1.2.3-optipng.

I was unable to locate this version online and assume it to be an outdated version of pngnq-s9 as indicated on the project homepage.

While I was also unable to successfully compile the latest version of pngnq-s9 (currently 2.0.1) on OS 10.9, I would like to suggest the project be updated with the latest version.

Unique color count

ImageAlpha should tell me how many unique colors my image contains or it should limit the upper bound to that.

image scaling in window

Every time I drag a small PNG image into ImageAlpha, it scales up the graphic so it's blurry even though the smooth scaling is set to 1x. If I use the slider bottom right each and every time changing it from 1x to something else and then back to 1x it displays at the correct size I need to view it at.

Please make it so that every time you drag a PNG image in, it displays it at the proper 1x size.

Thanks.

Saving directly from the application

When I drag PNG images into ImageAlpha instead of having to navigate my large 27" iMac screen to the top left and go to file/save as etc. is it possible to place a save as button directly on the application window maybe above Backgrounds? This would save at least 10-15 seconds per image thus saving a lot of time for many images.

Also on the very bottom where it says image size # bytes, can you place list the original image size and new size listing how many bytes were saved? There is a lot of wasted space to the right of bytes on the very bottom.

Thank you.

WebP and JPEG2000 support

Hi, I'm developing HTML5 mobile games and I've been researching if there's a way to make big sprite images even smaller.

To put this in a perspective, right now, a png-quantized sprite sheet of around 2000x2000 pixels is pretty big, around 1MB in file size, which is just too big for mobile.

So looking out there, I've found that:

  1. Android supports Google's own WebP (lossy with alpha), and that
  2. iOS supports JPEG2000 (lossy with alpha).

I've been playing with the command line for compressing the image,
and I'm getting file sizes as 20%~70% smaller than the PNG8 quantized version.

But because this is a lossy process, doing it from the command-line doesn't let you control in realtime the quality parameters.

So if ImageAlpha would support WebP/JPEG2000, we could easily create very small files and optimized for each platform, making possible HTML5 mobile games with lot's of graphics and million of colors just a reality.

What do you think on the subject?

Thank you!

Changes the colors of certain PNGs

For some reason, some of the PNGs I save out of Photoshop and then compress with ImageAlpha change color drastically, rendering the compression useless. Pretty sure it has something to do with color profiles, but I can't nail down the issue

no LICENSE file

Since this repo has no LICENSE file and no rights are granted by default, this project is effectively not open source. I suspect that's not the intention, but either way, it would be good to include a LICENSE file clarifying.

Speed up workflow

Hi,

I really love imagealpha - its a crucial part of my workflow now, many thanks for your work.

I have a feature request/idea. To speed up my workflow, it would be great for imagealpha to be able to watch a folder or have a 'droplet' type feature where I could drop png's onto the droplet-icon (or into the watch folder) and IM would automatically compress the file using pre-defined settings + pass the file through imageoptim then overwrite the original file.

The current workflow is pretty time consuming if using IM a lot, something like this would really speed things up.

Thanks for listening,
Matt

Why no File → Save option?

ImageAlpha requires that the file be saved in a multi-step process. That is, a new file must be named, or one must affirmatively agree to overwrite the existing file. It's not possible to simply save the file. In fact, that option is grayed out:

File menu

One must choose Save As, and choose to overwrite the existing file:

Save confirmation

This is a very different process than ImageOptim, which overwrites the existing file silently. I get that ImageOptim is non-interactive, while ImageAlpha requires the user to indicate by how much to simplify the color palette, but I don't see the need to disable Save.

I'm not reporting this as a bug, or requesting a feature, but instead just asking: why does ImageAlpha work like this?

Batch Processing

Can you please make a way to simply drag and drop multiple PNG images into ImageAlpha at once to compress?

I've tried ImageOptim and honestly PNG Gauntlet for PC is a LOT better giving me smaller files sizes and better quality gradations. PNG Gauntlet shows me the % compressed for each and every PNG image. I would like this for ImageAlpha.

Please make this,
Thanks!

Does not work on High Sierra

Instead of opening the document window when attempting to open an image, it instead dumps messages to the system log:

On startup:

Jun 15 17:37:03 Christophers-iMac ImageAlpha[2541]: DEPRECATED USE in libdispatch client: Changing the target of a source after it has been activated

On Open dialog:

Jun 15 17:37:13 Christophers-iMac ImageAlpha[2541]: objc[2541]: Class FIFinderSyncExtensionHost is implemented in both /System/Library/PrivateFrameworks/FinderKit.framework/FinderKit (0x1130e3200) and /System/Library/PrivateFrameworks/FileProvider.framework/OverrideBundles/FinderSyncCollaborationFileProviderOverride.bundle/Contents/MacOS/FinderSyncCollaborationFileProviderOverride (0x113552c00). One of the two will be used. Which one is undefined.
Jun 15 17:37:13 Christophers-iMac ImageAlpha[2541]: assertion failed: 17A264c: libxpc.dylib + 73873 [64AE8381-F096-3184-A85C-C50DB8D979E6]: 0x89

And on actually opening an image:

Jun 15 17:37:19 Christophers-iMac ImageAlpha[2541]: BUG in libdispatch: 17A264c - 2505 - 0x9ed
Jun 15 17:37:21 Christophers-iMac ImageAlpha[2541]: BUG in libdispatch client: kevent[mach_recv] monitored resource vanished before the source cancel handler was invoked

Slow startup on Sierra

I've just upgraded to a new laptop with Sierra, and ImageAlpha is now very slow to start.

Previously (Mountain Lion), the ImageAlpha window appeared after one "bounce" of the icon; now it takes 9-10 each time.

Do you know what might be causing this?

All of sudden unable to set preferences

Was working fine then tried jamesmason imageOptim-CLI (which is running ImageAlpha - but not processing - another issue) and not Preferences is grayed out.

I have deleted and readded the app to the Applications folder. I am on OSX Mavericks.

Thx

Drag and drop issue. ImageAlpha is not selected, Finder is selected instead

Every Time I drag and drop a PNG image I need to compress into ImageAlpha, the ImageAlpha application itself is not selected, Finder is selected instead.

I want to be able to quickly drag a PNG image into ImageAlpha, select File/Save As etc. Right now Directly after dragging a PNG image into ImageAlpha I have Finder selected. The act of dragging a PNG into ImageAlpha should make the application selected as the app is use to the right of the Apple logo top left.

Please fix.
Thanks!!

PyObjC program failed to start

I get the following message when trying to run ImageAlpha.
error
Both beta 1.40 and stable 1.3.5

My machine is running OS X 10.10.3 (14D136)
Python 2.7.6 (default, Sep 9 2014, 15:04:36)

There are no errors appearing in Console.app when this occurs.

Preview image aligns to subpixels on non-Retina displays

ImageAlpha 1.5.1
MacOS 10.13.3

I think the title is an accurate description of the problem. When dragging an image's preview around at 1x zoom, it changes the antialiasing of the image, rather than always showing true 1:1 pixels. (The image does not snap back to pixel-perfect when you stop dragging.)

imagealpha-dragging-subpixels

Ie6 preview mode

ImageAlpha may have a button to preview like ie6 mode (hide all pixel with alpha < 100%)

Build?

How do yuo build this? I'm getting missing deps for the linked binaries/frameworks, pngquant, pngnq, posterizer and sparkle. And probably liblibpng. Could they be added as git sub-modules?

Just out of interest, why did you decide to use PyObjC?

thanks

It would be good if opening multiple images opened them in tabs by default

Since the macOS has a feature to merge windows into tabs, it would be good if ImageAlpha opened images in tabs by default when multiple images are opened... although it's not difficult for the user to just merge windows into tabs after multiple windows get opened, it would be nicer if opening images in tabs was default.

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.