{"id":23979,"date":"2019-01-17T17:01:56","date_gmt":"2019-01-17T22:01:56","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=23979"},"modified":"2019-01-17T21:57:38","modified_gmt":"2019-01-18T02:57:38","slug":"acorn-6-3-postmortem","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2019\/01\/17\/acorn-6-3-postmortem\/","title":{"rendered":"Acorn 6.3 Postmortem"},"content":{"rendered":"<p><a href=\"http:\/\/shapeof.com\/archives\/2019\/1\/acorn_6.3_postmortem.html\">Gus Mueller<\/a>:<\/p>\n<blockquote cite=\"http:\/\/shapeof.com\/archives\/2019\/1\/acorn_6.3_postmortem.html\">\n<p>Apple added a new feature to its latest iPhones in the iOS 12 update called &ldquo;Portrait Matte&rdquo;. It&rsquo;s a special image embedded in HEIC images which is based off the depth data and some machine learning in your photo. You can then use this image as a mask to blur parts of your image (which is what the iOS &ldquo;Portrait&rdquo; camera setting does), or you can use this data to remove backgrounds.<\/p>\n<p>But how should Acorn expose this matte? My first stab was to have Acorn add the matte as an additional layer. After playing with it a bit, it just felt off. So I ended up adding the matte as a mask to the main layer when opening the image. But folks are obviously going to want to do more than just mask out the background so I added new features to Acorn where you could easily drag and drop the layer mask into into its own layer. I also made it easy to move an existing layer to another layer&rsquo;s mask via drag and drop. I can&rsquo;t predict what people are going to want to do with the mask, but I might as well make it easy to move around.<\/p>\n<p>It was also during this development that I found some bugs in Apple&rsquo;s My Photo Stream. The matte was showing up rotated incorrectly when opening images out of Photos. At first I figured I was just reading the data wrong, but nope- under certain conditions when images with the portrait mask were uploaded to MPS, the rotation data from the camera went missing. After some communication and a Radar filed at Apple, this bug was fixed in an OS update. Bug fixes like this don&rsquo;t happen very often, but when they do it makes filing all the other Radars worth it. Mostly.<\/p>\n<\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Gus Mueller: Apple added a new feature to its latest iPhones in the iOS 12 update called &ldquo;Portrait Matte&rdquo;. It&rsquo;s a special image embedded in HEIC images which is based off the depth data and some machine learning in your photo. You can then use this image as a mask to blur parts of your [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2019-01-17T22:01:58Z","apple_news_api_id":"ee159dd6-f3b3-447f-9d30-3c8054b9b502","apple_news_api_modified_at":"2019-01-18T02:57:42Z","apple_news_api_revision":"AAAAAAAAAAAAAAAAAAAAAA==","apple_news_api_share_url":"https:\/\/apple.news\/A7hWd1vOzRH-dMDyAVLm1Ag","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[2],"tags":[76,131,30,32,1609,450],"class_list":["post-23979","post","type-post","status-publish","format-standard","hentry","category-technology","tag-acorn","tag-bug","tag-mac","tag-macapp","tag-macos-10-14","tag-photostream"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/23979","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=23979"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/23979\/revisions"}],"predecessor-version":[{"id":23980,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/23979\/revisions\/23980"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=23979"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=23979"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=23979"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}