{"id":7334,"date":"2020-06-11T21:12:00","date_gmt":"2020-06-11T19:12:00","guid":{"rendered":"https:\/\/monodes.com\/predaelli\/?p=7334"},"modified":"2020-06-11T08:12:42","modified_gmt":"2020-06-11T06:12:42","slug":"imagemagick-remove-black-borders","status":"publish","type":"post","link":"https:\/\/monodes.com\/predaelli\/2020\/06\/11\/imagemagick-remove-black-borders\/","title":{"rendered":"ImageMagick &#8211; Remove black borders"},"content":{"rendered":"<p>It is as simple as:<\/p>\n<blockquote><p>magick mogrify -fuzz 4% -define trim:percent-background=0% -trim +repage -format jpg img.jpg<\/p><\/blockquote>\n<p>Source: <em><a href=\"https:\/\/stackoverflow.com\/questions\/50847360\/imagemagick-remove-black-borders\">Stack Overflow<\/a><\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p class=\"excerpt\">It is as simple as: magick mogrify -fuzz 4% -define trim:percent-background=0% -trim +repage -format jpg img.jpg Source: Stack Overflow<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"https:\/\/monodes.com\/predaelli\/2020\/06\/11\/imagemagick-remove-black-borders\/\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[72,278],"tags":[277],"class_list":["post-7334","post","type-post","status-publish","format-standard","hentry","category-documentations","category-tricks","tag-tricks"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6daft-1Ui","jetpack-related-posts":[{"id":9664,"url":"https:\/\/monodes.com\/predaelli\/2022\/09\/27\/15-weird-googling-tricks-99-9-of-developers-dont-know-about-javascript-in-plain-english\/","url_meta":{"origin":7334,"position":0},"title":"15 Weird Googling Tricks 99.9% of Developers Don&#8217;t Know\u00a0About | JavaScript in Plain English","author":"Paolo Redaelli","date":"2022-09-27","format":false,"excerpt":"15 Weird Googling Tricks 99.9% of Developers Don't Know\u00a0About | JavaScript in Plain English Well, I know most of them.","rel":"","context":"In &quot;Tricks&quot;","block_context":{"text":"Tricks","link":"https:\/\/monodes.com\/predaelli\/category\/documentations\/tricks\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4294,"url":"https:\/\/monodes.com\/predaelli\/2018\/04\/22\/dirty-tricks\/","url_meta":{"origin":7334,"position":1},"title":"&#8220;Dirty&#8221; tricks","author":"Paolo Redaelli","date":"2018-04-22","format":false,"excerpt":"In this article we show how we secured a Wordpress site and made it nearly unhackable by generating a static copy of the entire website on the fly, using shell scripting and HTTrack Sorgente: Making Wordpress nearly unhackable Ok, that's a dirty trick.","rel":"","context":"In &quot;Wordpress&quot;","block_context":{"text":"Wordpress","link":"https:\/\/monodes.com\/predaelli\/category\/wordpress\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":8729,"url":"https:\/\/monodes.com\/predaelli\/2021\/09\/29\/minding-the-gap-css-tricks\/","url_meta":{"origin":7334,"position":2},"title":"Minding the &#8220;gap&#8221; | CSS-Tricks","author":"Paolo Redaelli","date":"2021-09-29","format":"link","excerpt":"You might already know about the CSS gap property. It isn\u2019t exactly new, but it did gain an important new ability last year: it now works in Flexbox in Source: Minding the \"gap\" | CSS-Tricks","rel":"","context":"In &quot;HTML&quot;","block_context":{"text":"HTML","link":"https:\/\/monodes.com\/predaelli\/category\/html\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":9114,"url":"https:\/\/monodes.com\/predaelli\/2022\/02\/26\/svgcode-for-live-tracing-raster-images-css-tricks\/","url_meta":{"origin":7334,"position":3},"title":"SVGcode for Live Tracing Raster Images | CSS-Tricks","author":"Paolo Redaelli","date":"2022-02-26","format":false,"excerpt":"A free online tool called SVGcode by Thomas Steiner is capable of an effect called \"Live Trace\" that converts a raster image into a vector image. Source: SVGcode for Live Tracing Raster Images | CSS-Tricks Also https:\/\/svgco.de\/","rel":"","context":"In &quot;Senza categoria&quot;","block_context":{"text":"Senza categoria","link":"https:\/\/monodes.com\/predaelli\/category\/senza-categoria\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":5440,"url":"https:\/\/monodes.com\/predaelli\/2019\/04\/05\/unix-linux-trick-cd-back-to-the-previous-directory\/","url_meta":{"origin":7334,"position":4},"title":"Unix\/Linux trick: &#8216;cd&#8217; back to the previous directory","author":"Paolo Redaelli","date":"2019-04-05","format":false,"excerpt":"You know when you\u2019re in a very \u201cdeep\u201d directory, such as \/usr\/local\/src\/this\/that\/thatother, and you type \u201ccd\u201d and press enter by mistake ((happens a lot when you thin\u2026 Source: Unix\/Linux trick: 'cd' back to the previous directory Shortly, is as simple as \u00abcd -\u00bb. Since true knowledge lies in manpages, here's\u2026","rel":"","context":"In &quot;Documentations&quot;","block_context":{"text":"Documentations","link":"https:\/\/monodes.com\/predaelli\/category\/documentations\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":13395,"url":"https:\/\/monodes.com\/predaelli\/2025\/05\/21\/drop-caps-css-tricks\/","url_meta":{"origin":7334,"position":5},"title":"Drop Caps | CSS-Tricks","author":"Paolo Redaelli","date":"2025-05-21","format":"link","excerpt":"Drop Caps | CSS-Tricks The CSS3 way (no extra markup) Target the first character of the first paragraph using pseudo class selectors. No extra markup needed, but no IE < 9 support. <p> Just a normal sentence. <\/p> p:first-child:first-letter { color: #903; float: left; font-family: Georgia; font-size: 75px; line-height: 60px;\u2026","rel":"","context":"In &quot;Documentations&quot;","block_context":{"text":"Documentations","link":"https:\/\/monodes.com\/predaelli\/category\/documentations\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts\/7334","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/comments?post=7334"}],"version-history":[{"count":0,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts\/7334\/revisions"}],"wp:attachment":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/media?parent=7334"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/categories?post=7334"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/tags?post=7334"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}