unit FPimage causes "Adobe ImageReady" in binary. Why? lazarus / 39-Graphics ---------------------------------------------------------------------- winni · 2020-12-05 01:12 Hi! Just noticed while searching something different: Whenever I include FPimage in the uses section then the binary  contains a string Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Adobe ImageReady Why? Without starting your own project you can detect this string in the fcl packages: Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i grep -ir 'Adobe ImageReady' *grep: 3.0.4/packages/fcl- pdf/tests/lib/x86_64-linux/unittests_gui.or: binary file matchesgrep: 3.0.4/packages/fcl-pdf/tests/unittests_gui: binary file matches I searched extensive in the source but could not find it. Winni ---------------------------------------------------------------------- dsiders · 2020-12-05 03:49 Quote from: winni on December 05, 2020, 02:12:07 amHi! Just noticed while searching something different: Whenever I include FPimage in the uses section then the binary  contains a string Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Adobe ImageReady Why? Without starting your own project you can detect this string in the fcl packages: Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i grep -ir 'Adobe ImageReady' *grep: 3.0.4/packages/fcl- pdf/tests/lib/x86_64-linux/unittests_gui.or: binary file matchesgrep: 3.0.4/packages/fcl-pdf/tests/unittests_gui: binary file matches I searched extensive in the source but could not find it. Winni Apparently, this is resource metadata for some image (or resource using the image) built with Adode ImageReady, PhotoShop, or Creative Suite. It's in lazarus/images/bookmark.res and several images. It's also in fcl-pdf. ---------------------------------------------------------------------- winni · 2020-12-05 13:23 Hi! Thanx dsiders! That has't come to my mind. I think as we work on open source we should get rid of the Adobe metadata. Solution 1: Load all the files containing Adobe ImageReady into Gimp or LazPaint and do a "Save as" with the same filename. Solution 2: Use this script: Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i #!/bin/bash # /scripts/NoAdobe winni 5.12.2020 laz=/usr/lib64/lazarus/fpc=/usr/share/fpcsrc/Adobe='Adobe\ ImageReady'WeAre='fpc\ and\ Lazarus ' for dir in $laz $fpc dofind $dir  -type f   \( -iname "*.png" -o -iname "*.res" \) | { while read fname     do    grep "$Adobe"  "$fname"    if [ $? -eq 0 ]        then      echo 'YES'        echo $fname        # backup          cp "$fname" "$fname"_old          cat "$fname" | sed 's/'"$Adobe"'/'"$WeAre"'/g' > "$fname"    fi     done }    done  Winni ---------------------------------------------------------------------- dsiders · 2020-12-05 16:43 Quote from: winni on December 05, 2020, 02:23:53 pmHi! Thanx dsiders! That has't come to my mind. I think as we work on open source we should get rid of the Adobe metadata. Solution 1: Load all the files containing Adobe ImageReady into Gimp or LazPaint and do a "Save as" with the same filename. Solution 2: Use this script: Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i #!/bin/bash# /scripts/NoAdobe winni 5.12.2020...   Winni Well, you'll still see it if you use third party resources that include the metadata. I found these files: In Lazarus: Code: Diff  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i components/ fppkg/images/archive.pngcomponents/fppkg/images/download.pngimages/boo kmark.resimages/menu/bug_small.pngimages/sourceeditor/tsynsyncroedit.p nglcl/dialog_icons.reslcl/images/dialogs/dialog_shield.pnglcl/images/d ock/lcl_dock_to_bottom.pnglcl/images/dock/lcl_dock_to_left.pnglcl/imag es/dock/lcl_dock_to_right.pnglcl/images/dock/lcl_dock_to_top.pnglcl/im ages/wince/wincedialog_cancel.pnglcl/lcl_dock_to_images.rescomponents/ onlinepackagemanager/images/Tree_Buttons/00 Repository.pngcomponents/onlinepackagemanager/images/Tree_Buttons/10 License.pngcomponents/onlinepackagemanager/images/Tree_Buttons/14 Repo sitorySize.pngcomponents/onlinepackagemanager/images/Tree_Buttons/16 R epositoryDate.pngcomponents/onlinepackagemanager/images/Tree_Buttons/F ileVersion.png  In FPC: Code: Diff  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i fpc/3.2.0/source/packages/fcl-pdf/examples/diamond.png In Third Party: Code: Diff  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i components/bgracontrols/icons/bclabel_icon.lrs components/bgracontrols /icons/bcsvgbutton.lrscomponents/bgracontrols/icons/bgraspriteanimatio n_icon.lrs And I don't use that many third party controls. Other than symbol purity, why is this an issue? ---------------------------------------------------------------------- lucamar · 2020-12-05 17:40 Quote from: dsiders on December 05, 2020, 05:43:57 pmOther than symbol purity, why is this an issue? While a small one, it's nevertheless an issue because it "fattens" the final binary while adding nothing at all. I mean, who cares whether the icons embeded in my program were edited with some Adobe (or whoever else's) software? Say there a hundred icons, all of them with "Adobe ImageReady": that wastes 16*100 = 1,6 KiB, and it indicates that there is probably even more useless metadata ocupying more KiB. Yeah, all in all it might be a trivial question of a few KiB for most of us but for some it might be relatively important and it's a completely useless waste. ---------------------------------------------------------------------- wp · 2020-12-05 17:52 I'm not a lawyer. But I doubt that we are not allowed to remove any meta data, unless there is some less restrictive license on these images, but I don't even know where these images come from. So why risk a law suite with some money-eager lawyer just for a few bytes? And I even could imagine that these meta data (it's the IPTC meta data in this case which begin with an "Adobe" identifying string) are useful for somebody. Replacing the "Adobe" by something else will definitely destroy IPTC. ---------------------------------------------------------------------- winni · 2020-12-05 19:47 Oh gosh!!! Why are you so afraid of the lawyers. They are the human's  best friend! If they could do something useful perhaps they would become humans! Nearly every image format has a comment field. Most the applications write their name in it. By default this is done by the application which made the last change. If you want humourous, anoying and pubescent  comments then you should have a look into the animated Gifs. In the comment field. So it is not a crime, Everybody does this.  Adobe, Gimp, Corel, Microsoft. And a horde of young boys. I don't like Adobe. In the early days of image processing they bought all these little companies to get the monopol. I learned to work with image with the help of the PhotoStyler. Version 2.0 appeared and after that Adobe had bought it and it disappeared. [ Today this is for free in some museum ]. Not a big issue. But one of the loose ends where we should care about Open Source. Winni