{"action":"created","issue":{"url":"https://api.github.com/repos/haraldk/TwelveMonkeys/issues/98","labels_url":"https://api.github.com/repos/haraldk/TwelveMonkeys/issues/98/labels{/name}","comments_url":"https://api.github.com/repos/haraldk/TwelveMonkeys/issues/98/comments","events_url":"https://api.github.com/repos/haraldk/TwelveMonkeys/issues/98/events","html_url":"https://github.com/haraldk/TwelveMonkeys/issues/98","id":58861876,"number":98,"title":"Expose PSDLayerInfo?","user":{"login":"JavadocMD","id":6167443,"avatar_url":"https://avatars.githubusercontent.com/u/6167443?v=3","gravatar_id":"","url":"https://api.github.com/users/JavadocMD","html_url":"https://github.com/JavadocMD","followers_url":"https://api.github.com/users/JavadocMD/followers","following_url":"https://api.github.com/users/JavadocMD/following{/other_user}","gists_url":"https://api.github.com/users/JavadocMD/gists{/gist_id}","starred_url":"https://api.github.com/users/JavadocMD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JavadocMD/subscriptions","organizations_url":"https://api.github.com/users/JavadocMD/orgs","repos_url":"https://api.github.com/users/JavadocMD/repos","events_url":"https://api.github.com/users/JavadocMD/events{/privacy}","received_events_url":"https://api.github.com/users/JavadocMD/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/haraldk/TwelveMonkeys/labels/New%20feature","name":"New feature","color":"009800"}],"state":"closed","locked":false,"assignee":{"login":"haraldk","id":110299,"avatar_url":"https://avatars.githubusercontent.com/u/110299?v=3","gravatar_id":"","url":"https://api.github.com/users/haraldk","html_url":"https://github.com/haraldk","followers_url":"https://api.github.com/users/haraldk/followers","following_url":"https://api.github.com/users/haraldk/following{/other_user}","gists_url":"https://api.github.com/users/haraldk/gists{/gist_id}","starred_url":"https://api.github.com/users/haraldk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haraldk/subscriptions","organizations_url":"https://api.github.com/users/haraldk/orgs","repos_url":"https://api.github.com/users/haraldk/repos","events_url":"https://api.github.com/users/haraldk/events{/privacy}","received_events_url":"https://api.github.com/users/haraldk/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/haraldk/TwelveMonkeys/milestones/2","html_url":"https://github.com/haraldk/TwelveMonkeys/milestones/3.1","labels_url":"https://api.github.com/repos/haraldk/TwelveMonkeys/milestones/2/labels","id":519831,"number":2,"title":"3.1","description":"Features that didn't make it into 3.0:\r\n- CMYK JPEG write support\r\n- TIFF write support","creator":{"login":"haraldk","id":110299,"avatar_url":"https://avatars.githubusercontent.com/u/110299?v=3","gravatar_id":"","url":"https://api.github.com/users/haraldk","html_url":"https://github.com/haraldk","followers_url":"https://api.github.com/users/haraldk/followers","following_url":"https://api.github.com/users/haraldk/following{/other_user}","gists_url":"https://api.github.com/users/haraldk/gists{/gist_id}","starred_url":"https://api.github.com/users/haraldk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haraldk/subscriptions","organizations_url":"https://api.github.com/users/haraldk/orgs","repos_url":"https://api.github.com/users/haraldk/repos","events_url":"https://api.github.com/users/haraldk/events{/privacy}","received_events_url":"https://api.github.com/users/haraldk/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":25,"state":"open","created_at":"2013-12-23T10:17:14Z","updated_at":"2015-02-26T21:08:58Z","due_on":"2015-01-04T23:00:00Z","closed_at":null},"comments":4,"created_at":"2015-02-25T07:36:57Z","updated_at":"2015-02-26T21:08:58Z","closed_at":"2015-02-26T21:08:58Z","body":"I find myself in a use-case where I need more info about PSD-file layers. I see that it is currently stored in PSDLayerInfo: things like top, bottom, and name. However this appears to be access-restricted info. Would it be possible to expose this data (even if we have to use unsafe casts to get at it), or am I missing a good reason to hide it?\r\n\r\nI would be happy to submit a pull request if that would be helpful. Thanks!"},"comment":{"url":"https://api.github.com/repos/haraldk/TwelveMonkeys/issues/comments/76273815","html_url":"https://github.com/haraldk/TwelveMonkeys/issues/98#issuecomment-76273815","issue_url":"https://api.github.com/repos/haraldk/TwelveMonkeys/issues/98","id":76273815,"user":{"login":"haraldk","id":110299,"avatar_url":"https://avatars.githubusercontent.com/u/110299?v=3","gravatar_id":"","url":"https://api.github.com/users/haraldk","html_url":"https://github.com/haraldk","followers_url":"https://api.github.com/users/haraldk/followers","following_url":"https://api.github.com/users/haraldk/following{/other_user}","gists_url":"https://api.github.com/users/haraldk/gists{/gist_id}","starred_url":"https://api.github.com/users/haraldk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haraldk/subscriptions","organizations_url":"https://api.github.com/users/haraldk/orgs","repos_url":"https://api.github.com/users/haraldk/repos","events_url":"https://api.github.com/users/haraldk/events{/privacy}","received_events_url":"https://api.github.com/users/haraldk/received_events","type":"User","site_admin":false},"created_at":"2015-02-26T21:08:58Z","updated_at":"2015-02-26T21:08:58Z","body":"Fixed in c3cafc63d82476c1853b21195c45138edcb8e8dd. \r\n\r\nMetadata is available from the `PSDImageReader` for image index 0, you should be able to obtain it like this:\r\n\r\n    IIOMetadata metadata = imageReader.getImageMetadata(0);\r\n    IIOMetadataNode root = (IIOMetadataNode) metadata.getAsTree(PSDMetadata.NATIVE_METADATA_FORMAT_NAME);\r\n    NodeList layers = root.getElementsByTagName(\"Layers\");\r\n    // ... get the info you want...\r\n\r\nThe native PSD meta data looks something like this:\r\n\r\n    <com_twelvemonkeys_imageio_psd_image_1.0>\r\n\t<Header type=\"PSD\" version=\"1\" channels=\"3\" height=\"512\" width=\"341\" bits=\"8\" mode=\"RGB\"/>\r\n\t<ImageResources>\r\n        <!-- ... -->\r\n\t</ImageResources>\r\n\t<Layers>\r\n\t\t<LayerInfo name=\"Layer 0\" top=\"0\" left=\"0\" bottom=\"512\" right=\"341\" blendMode=\"norm\" opacity=\"255\" clipping=\"base\" flags=\"40\"/>\r\n\t\t<LayerInfo name=\"Invert 1\" top=\"0\" left=\"0\" bottom=\"0\" right=\"0\" blendMode=\"norm\" opacity=\"255\" clipping=\"base\" flags=\"56\" pixelDataIrrelevant=\"true\"/>\r\n\t\t<LayerInfo name=\"Layer 1\" top=\"114\" left=\"86\" bottom=\"321\" right=\"250\" blendMode=\"norm\" opacity=\"255\" clipping=\"base\" flags=\"40\"/>\r\n\t\t<LayerInfo name=\"A text object created in PS7.0\" top=\"33\" left=\"95\" bottom=\"94\" right=\"317\" blendMode=\"norm\" opacity=\"255\" clipping=\"base\" flags=\"40\"/>\r\n\t</Layers>\r\n\t<GlobalLayerMask colorSpace=\"0\" colors=\"-1, 0, 0, 0\" opacity=\"50\" kind=\"layer\"/>\r\n    </com_twelvemonkeys_imageio_psd_image_1.0>\r\n\r\nThe fix will be released as part of 3.1 very soon. If you can't wait, you can use the latest version and build from source. :-)\r\n\r\nPS: Feel free to reopen, should you have any questions regarding this issue.\r\n\r\n\r\nBest regards,\r\n\r\n-- \r\nHarald K"}}