I just found out that images can have more than 20KB of EXIF data. Not really an issue with 2MB files, but if you have small thumbnails this really adds up. I use mogrify often to resize, and I can use mogrify -strip to remove the EXIF data. However, if I use Nautilus Image Converter there is no way to strip this data. Is there something in the configuration I can set so it always automatically adds the -strip flag to the command?
Asked
Active
Viewed 1,205 times
5
-
have you tried compiling Nautilus Image Converter after the below mentioned changes? – binW Jun 28 '11 at 09:29
2 Answers
1
I downloaded the code for Nautilus Image Converter and been through it configuration file and I dont think that this is possible from configuration file. But, if you open nautilus-image-resizer.c and take a look at line 320, you will see the following code:
gchar *argv[6];
argv[0] = "/usr/bin/convert";
argv[1] = filename;
argv[2] = "-resize";
argv[3] = priv->size;
argv[4] = new_filename;
argv[5] = NULL;
as you see, this is where the arguments for Imagemagick convert utility are being created. I think if you change this to following, it should solve your problem:
gchar *argv[6];
argv[0] = "/usr/bin/convert";
argv[1] = filename;
argv[2] = "-resize";
argv[3] = priv->size;
argv[4] = "-strip"
argv[5] = new_filename;
DISCLAIMER: I havent tried this. This answer is solely based on my limited understanding of the Nautilus Image Converter code. So I would recommend to backup your images before using the modified version.
binW
- 12,804
- 8
- 49
- 66
-
1I think you need to change `gchar *argv[6];` to `gchar *argv[7];` and add `argv[6] = NULL;` to the end. – Nathan Osman Jun 25 '11 at 21:49
-
@George-Edison: may be but I am not sure about that. The first argument of main() is argc i.e argument count, and second is argv[]. So convert should get the argument count along with the arguments. – binW Jun 26 '11 at 11:32
-
@binW, would it be a good idea to add instructions on how to recompile this package to incorporate the changes? – Knowledge Cube Jun 27 '11 at 02:06
-
@Warrioring64: plua must be aware of how to compile because I couldnt find an installable package on Nautilus Image Converter site. all they are providing is the source so plua must have compiled and installed it before. – binW Jun 27 '11 at 06:31
-
@binW I have been looking for the aforementioned file (nautilus-image-resizer.c), but can not locate this. I need to compile from source to get this? It all sounds quite complicated, I am new to this. Is there no way to get this done without compiling? – Jul 01 '11 at 21:19
-
no I dont think so. At least I havent found any such option. You will need to recompile it to get this working. And nautilus-image-resizer.c is present in the src folder in the downloaded source. – binW Jul 02 '11 at 19:48
-
NOTE: I am marking this as solved. Haven't dared to compile this myself, but the answer indicates that there is no way to do this any other way, which appears to be the case. Thanks for your help. – Oct 30 '11 at 00:43
0
-
Whilst this may theoretically answer the question, [it would be preferable](//meta.stackoverflow.com/q/8259) to include the essential parts of the answer here, and provide the link for reference. – Kevin Bowen Oct 05 '16 at 06:21