Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

ToolkitError: Unsupported PNG bit depth: 4 #77

Closed
cor-rine opened this issue Dec 12, 2017 · 3 comments
Closed

ToolkitError: Unsupported PNG bit depth: 4 #77

cor-rine opened this issue Dec 12, 2017 · 3 comments
Assignees
Labels

Comments

@cor-rine
Copy link

While creating graph lab images - PNG images are not currently supported by the ToolKit, resulting in the following error to be thrown:
ToolkitError: Unsupported PNG bit depth: 4

Complete error details:

---------------------------------------------------------------------------
ToolkitError                              Traceback (most recent call last)
/Users/corrinetoracchio/Projects/corSheetMusic/turi/read-timed-notes.py in <module>()
     11 
     12                 for imageFile in data:
---> 13                          gl.Image(imageFile.replace('\n', ''))

/Users/corrinetoracchio/anaconda/envs/gl-env/lib/python2.7/site-packages/graphlab/data_structures/image.pyc in __init__(self, path, format, **_Image__internal_kw_args)
     70             from ..util import _make_internal_url
     71             from .. import extensions as _extensions
---> 72             img = _extensions.load_image(_make_internal_url(path), format)
     73             for key, value in list(img.__dict__.items()):
     74                 setattr(self, key, value)

/Users/corrinetoracchio/anaconda/envs/gl-env/lib/python2.7/site-packages/graphlab/extensions.pyc in <lambda>(*args, **kwargs)
    166 
    167 def _make_injected_function(fn, arguments):
--> 168     return lambda *args, **kwargs: _run_toolkit_function(fn, arguments, args, kwargs)
    169 
    170 def _class_instance_from_name(class_name, *arg, **kwarg):

/Users/corrinetoracchio/anaconda/envs/gl-env/lib/python2.7/site-packages/graphlab/extensions.pyc in _run_toolkit_function(fnname, arguments, args, kwargs)
    155     if ret[0] != True:
    156         if len(ret[1]) > 0:
--> 157             raise _ToolkitError(ret[1])
    158         else:
    159             raise _ToolkitError("Toolkit failed with unknown error")

ToolkitError: Unsupported PNG bit depth: 4
@znation
Copy link
Contributor

znation commented Dec 12, 2017

@cor-rine PNG images should be supported with other bit depths (like 8 bits per channel). We'll keep this issue open to track adding support for 4-bit images. In the meantime, as a workaround you could use another tool like ImageMagick to convert the bit depth to 24-bit (8 bits per channel, 3 channels) or 32-bit (8 bits per channel, 4 channels) prior to loading the images into Turi Create. Hope that helps!

@cor-rine
Copy link
Author

cor-rine commented Dec 13, 2017

Hey, thanks @znation - actually, I think I messed up and logged my issue into your bucket by accident. I was working with graphlab Image and filed your issue because of the logo. Are you associated with graphlab? This issue might be more relevant to their team.

@gustavla
Copy link
Collaborator

This issue is fixed by #393. In the next release of Turi Create, you should be able to load those images without a problem. Thanks for reporting this!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants