{"id":36586,"date":"2024-09-07T19:24:22","date_gmt":"2024-09-07T23:24:22","guid":{"rendered":"https:\/\/ckms.ca\/?p=36586"},"modified":"2024-09-07T19:37:17","modified_gmt":"2024-09-07T23:37:17","slug":"testing-the-resiliency-of-the-comments-property-of-a-jpg-file","status":"publish","type":"post","link":"https:\/\/blog.ckms.ca\/?p=36586","title":{"rendered":"testing the resiliency of the comments property of a .JPG file"},"content":{"rendered":"\n<p>here&#8217;s an interesting chart:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/blog.ckms.ca\/wp-content\/uploads\/2024\/09\/chart-50-years-of-global-steel-production.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"879\" src=\"https:\/\/blog.ckms.ca\/wp-content\/uploads\/2024\/09\/chart-50-years-of-global-steel-production-1024x879.jpg\" alt=\"\" class=\"wp-image-36589\" srcset=\"https:\/\/blog.ckms.ca\/wp-content\/uploads\/2024\/09\/chart-50-years-of-global-steel-production-1024x879.jpg 1024w, https:\/\/blog.ckms.ca\/wp-content\/uploads\/2024\/09\/chart-50-years-of-global-steel-production-300x258.jpg 300w, https:\/\/blog.ckms.ca\/wp-content\/uploads\/2024\/09\/chart-50-years-of-global-steel-production-768x659.jpg 768w, https:\/\/blog.ckms.ca\/wp-content\/uploads\/2024\/09\/chart-50-years-of-global-steel-production-750x644.jpg 750w, https:\/\/blog.ckms.ca\/wp-content\/uploads\/2024\/09\/chart-50-years-of-global-steel-production-675x579.jpg 675w, https:\/\/blog.ckms.ca\/wp-content\/uploads\/2024\/09\/chart-50-years-of-global-steel-production.jpg 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption>caption edited after uploading and publishing<\/figcaption><\/figure><\/div>\n\n\n\n<p>I have added a small &#8220;comment&#8221; to this file in the Properties -> Details -> Comment field.  <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/blog.ckms.ca\/wp-content\/uploads\/2024\/09\/comment-property-persistence-set-comments-property-chart-50-years-of-global-steel-production.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"881\" height=\"563\" src=\"https:\/\/blog.ckms.ca\/wp-content\/uploads\/2024\/09\/comment-property-persistence-set-comments-property-chart-50-years-of-global-steel-production.jpg\" alt=\"\" class=\"wp-image-36592\" srcset=\"https:\/\/blog.ckms.ca\/wp-content\/uploads\/2024\/09\/comment-property-persistence-set-comments-property-chart-50-years-of-global-steel-production.jpg 881w, https:\/\/blog.ckms.ca\/wp-content\/uploads\/2024\/09\/comment-property-persistence-set-comments-property-chart-50-years-of-global-steel-production-300x192.jpg 300w, https:\/\/blog.ckms.ca\/wp-content\/uploads\/2024\/09\/comment-property-persistence-set-comments-property-chart-50-years-of-global-steel-production-768x491.jpg 768w, https:\/\/blog.ckms.ca\/wp-content\/uploads\/2024\/09\/comment-property-persistence-set-comments-property-chart-50-years-of-global-steel-production-750x479.jpg 750w, https:\/\/blog.ckms.ca\/wp-content\/uploads\/2024\/09\/comment-property-persistence-set-comments-property-chart-50-years-of-global-steel-production-675x431.jpg 675w\" sizes=\"auto, (max-width: 881px) 100vw, 881px\" \/><\/a><\/figure><\/div>\n\n\n\n<span class=\"collapseomatic \" id=\"id69d62d7f398cb\"  tabindex=\"0\" title=\"\"    ><\/span><div id=\"target-id69d62d7f398cb\" class=\"collapseomatic_content \">BUG!! note how WordPress <em>tries <\/em>to use this metadata as the image&#8217;s &#8220;Caption&#8221;; the bug is it displays the comment text as a string of &#8220;????&#8221;, the length of which is exactly the number of characters in the comment; this is mildly annoying for short commants, but really messes with thisng when it&#8217;s hundreds much longer (.jpg commentsd field is limited to 64K chars per comment block, but can support multiple comment blocks; which I think is an interesting hack&#8230;. what If I wrote a trillion chras to a comment field on a disk without a trillion buytes availa?<\/p>\n\n\n\n<p><br><\/div>\n\n\n\n<p>to test if the .jpg comment property is resilient across file systemns, try downloading the above image and see if the comments qare in the fdownloaded file.<br>happily, when download to my computer, the comment property is preserved.<\/p>\n\n\n\n<p>but what if I edit the caption?<br>happily, editing the caption does not affect the comments property<\/p>\n\n\n\n<p>still to test: to someone else&#8217;s file system; to a mac file system; to a *nix file system.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>here&#8217;s an interesting chart: I have added a small &#8220;comment&#8221; to this&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[282],"tags":[2041,1833],"class_list":["post-36586","post","type-post","status-publish","format-standard","hentry","category-article","tag-file-system","tag-filenaming","wpcat-282-id"],"_links":{"self":[{"href":"https:\/\/blog.ckms.ca\/index.php?rest_route=\/wp\/v2\/posts\/36586","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ckms.ca\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ckms.ca\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ckms.ca\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ckms.ca\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=36586"}],"version-history":[{"count":6,"href":"https:\/\/blog.ckms.ca\/index.php?rest_route=\/wp\/v2\/posts\/36586\/revisions"}],"predecessor-version":[{"id":36598,"href":"https:\/\/blog.ckms.ca\/index.php?rest_route=\/wp\/v2\/posts\/36586\/revisions\/36598"}],"wp:attachment":[{"href":"https:\/\/blog.ckms.ca\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=36586"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ckms.ca\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=36586"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ckms.ca\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=36586"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}