{"action":"created","issue":{"url":"https://api.github.com/repos/GrokImageCompression/grok/issues/7","repository_url":"https://api.github.com/repos/GrokImageCompression/grok","labels_url":"https://api.github.com/repos/GrokImageCompression/grok/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/GrokImageCompression/grok/issues/7/comments","events_url":"https://api.github.com/repos/GrokImageCompression/grok/issues/7/events","html_url":"https://github.com/GrokImageCompression/grok/issues/7","id":156775601,"number":7,"title":"Compiling Grok w/ Pillow (and IIP server)","user":{"login":"calvinbutcher","id":801569,"avatar_url":"https://avatars.githubusercontent.com/u/801569?v=3","gravatar_id":"","url":"https://api.github.com/users/calvinbutcher","html_url":"https://github.com/calvinbutcher","followers_url":"https://api.github.com/users/calvinbutcher/followers","following_url":"https://api.github.com/users/calvinbutcher/following{/other_user}","gists_url":"https://api.github.com/users/calvinbutcher/gists{/gist_id}","starred_url":"https://api.github.com/users/calvinbutcher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calvinbutcher/subscriptions","organizations_url":"https://api.github.com/users/calvinbutcher/orgs","repos_url":"https://api.github.com/users/calvinbutcher/repos","events_url":"https://api.github.com/users/calvinbutcher/events{/privacy}","received_events_url":"https://api.github.com/users/calvinbutcher/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/GrokImageCompression/grok/labels/help%20wanted","name":"help wanted","color":"159818"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":87,"created_at":"2016-05-25T15:10:11Z","updated_at":"2016-06-08T00:29:08Z","closed_at":null,"body":"Hello,\r\n\r\nHaving successfully compiled IIP and Loris image servers with OpenJPEG 2.1 (https://github.com/bodleian/iipsrv-openjpeg-docker and https://github.com/bodleian/loris-openjpeg-docker), we're now trying to provide a docker image with your optimised fork of OpenJPEG, Grok 1.0.\r\n\r\nAs far as I can tell, Pillow (the Python Imaging Library) does not like Grok 1.0, while it will work happily with OpenJPEG 2.1.\r\n\r\nI get a Pillow compile error (when attempting to integrate w/ IIP server) as follows:\r\n\r\n```\r\n    x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBJPEG -DHAVE_OPENJPEG -DHAVE_LIBZ -DHAVE_LIBTIFF -I/usr/local/include/openjpeg-2.1 -I/tmp/pip-build-0XyZIt/Pillow/libImaging -I/usr/include -I/usr/local/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c libImaging/Jpeg2KDecode.c -o build/temp.linux-x86_64-2.7/libImaging/Jpeg2KDecode.o\r\n    In file included from libImaging/Jpeg2K.h:11:0,\r\n                     from libImaging/Jpeg2KDecode.c:21:\r\n    /usr/local/include/openjpeg-2.1/openjpeg.h:1013:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]\r\n     OPJ_API void OPJ_CALLCONV opj_cleanup();\r\n     ^\r\n    In file included from libImaging/Jpeg2K.h:11:0,\r\n                     from libImaging/Jpeg2KDecode.c:21:\r\n    /usr/local/include/openjpeg-2.1/openjpeg.h:1662:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]\r\n     OPJ_API uint32_t OPJ_CALLCONV opj_plugin_get_debug_state();\r\n     ^\r\n    libImaging/Jpeg2KDecode.c: In function ‘j2k_decode_entry’:\r\n    libImaging/Jpeg2KDecode.c:574:5: error: too few arguments to function ‘opj_stream_set_user_data’\r\n         opj_stream_set_user_data(stream, decoder);\r\n         ^\r\n    In file included from libImaging/Jpeg2K.h:11:0,\r\n                     from libImaging/Jpeg2KDecode.c:21:\r\n    /usr/local/include/openjpeg-2.1/openjpeg.h:1125:27: note: declared here\r\n     OPJ_API void OPJ_CALLCONV opj_stream_set_user_data (opj_stream_t* p_stream, void * p_data, opj_stream_free_user_data_fn p_function);\r\n                               ^\r\n    libImaging/Jpeg2KDecode.c:688:35: warning: pointer targets in passing argument 5 of ‘opj_read_tile_header’ differ in signedness [-Wpointer-sign]\r\n                                       &should_continue)) {\r\n                                       ^\r\n    In file included from libImaging/Jpeg2K.h:11:0,\r\n                     from libImaging/Jpeg2KDecode.c:21:\r\n    /usr/local/include/openjpeg-2.1/openjpeg.h:1427:27: note: expected ‘uint32_t *’ but argument is of type ‘OPJ_INT32 *’\r\n     OPJ_API bool OPJ_CALLCONV opj_read_tile_header( opj_codec_t *p_codec,\r\n                               ^\r\n    libImaging/Jpeg2KDecode.c:688:35: warning: pointer targets in passing argument 6 of ‘opj_read_tile_header’ differ in signedness [-Wpointer-sign]\r\n                                       &should_continue)) {\r\n                                       ^\r\n    In file included from libImaging/Jpeg2K.h:11:0,\r\n                     from libImaging/Jpeg2KDecode.c:21:\r\n    /usr/local/include/openjpeg-2.1/openjpeg.h:1427:27: note: expected ‘uint32_t *’ but argument is of type ‘OPJ_INT32 *’\r\n     OPJ_API bool OPJ_CALLCONV opj_read_tile_header( opj_codec_t *p_codec,\r\n                               ^\r\n    libImaging/Jpeg2KDecode.c:688:35: warning: pointer targets in passing argument 7 of ‘opj_read_tile_header’ differ in signedness [-Wpointer-sign]\r\n                                       &should_continue)) {\r\n                                       ^\r\n    In file included from libImaging/Jpeg2K.h:11:0,\r\n                     from libImaging/Jpeg2KDecode.c:21:\r\n    /usr/local/include/openjpeg-2.1/openjpeg.h:1427:27: note: expected ‘uint32_t *’ but argument is of type ‘OPJ_INT32 *’\r\n     OPJ_API bool OPJ_CALLCONV opj_read_tile_header( opj_codec_t *p_codec,\r\n                               ^\r\n    libImaging/Jpeg2KDecode.c:688:35: warning: pointer targets in passing argument 8 of ‘opj_read_tile_header’ differ in signedness [-Wpointer-sign]\r\n                                       &should_continue)) {\r\n                                       ^\r\n    In file included from libImaging/Jpeg2K.h:11:0,\r\n                     from libImaging/Jpeg2KDecode.c:21:\r\n    /usr/local/include/openjpeg-2.1/openjpeg.h:1427:27: note: expected ‘uint32_t *’ but argument is of type ‘OPJ_INT32 *’\r\n     OPJ_API bool OPJ_CALLCONV opj_read_tile_header( opj_codec_t *p_codec,\r\n                               ^\r\n    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1\r\n\r\n```\r\n\r\nWhen compiling Pillow with Loris integration I get:\r\n\r\n`error: unknown type name 'OPJ_CINEMA_MODE'`\r\n\r\nOPJ_CINEMA_MODE is a deprecated feature as listed here:\r\n\r\n> \"typedef enum CINEMA_MODE OPJ_CINEMA_MODE\r\n> \r\n> DEPRECATED: use RSIZ, OPJ_PROFILE_* and OPJ_EXTENSION_* instead Digital cinema operation mode.\"\r\n> \r\n\r\nfrom http://www.openjpeg.org/doxygen/openjpeg_8h.html\r\n\r\nSo my question is: is Grok 1.0 perhaps based on a pre-2.1 version of OpenJPEG that will not compile with Pillow/PIL? Or am I doing something wrong?\r\n\r\nMy sincere apologies if I'm making a simple error here. I'm a bit of a newbie when it comes to this sort of thing.\r\n\r\nBest regards,\r\nCalvin\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/GrokImageCompression/grok/issues/comments/224454126","html_url":"https://github.com/GrokImageCompression/grok/issues/7#issuecomment-224454126","issue_url":"https://api.github.com/repos/GrokImageCompression/grok/issues/7","id":224454126,"user":{"login":"boxerab","id":95393,"avatar_url":"https://avatars.githubusercontent.com/u/95393?v=3","gravatar_id":"","url":"https://api.github.com/users/boxerab","html_url":"https://github.com/boxerab","followers_url":"https://api.github.com/users/boxerab/followers","following_url":"https://api.github.com/users/boxerab/following{/other_user}","gists_url":"https://api.github.com/users/boxerab/gists{/gist_id}","starred_url":"https://api.github.com/users/boxerab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boxerab/subscriptions","organizations_url":"https://api.github.com/users/boxerab/orgs","repos_url":"https://api.github.com/users/boxerab/repos","events_url":"https://api.github.com/users/boxerab/events{/privacy}","received_events_url":"https://api.github.com/users/boxerab/received_events","type":"User","site_admin":false},"created_at":"2016-06-08T00:29:08Z","updated_at":"2016-06-08T00:29:08Z","body":"I found the test images : the first one has an error in it, but the others should decode fine."}}
{"actor":{"display_login":"boxerab"}}