It is currently Sun Jul 21, 2024 4:13 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: G'MIC Trouble saving
PostPosted: Wed Nov 20, 2013 10:41 pm  (#1) 
Offline
New Member

Joined: Nov 20, 2013
Posts: 3
Hi there,

Not sure if this is the right place to be asking the question, I'm having trouble writing the output of a file using G'MIC. Part of a script that automatically reduces the size of image files, works for roughly 50% of the files, others it doesn't with no error as to why.

The command I'm running is:
gmic.exe "c:\Photos\DSCN0001.JPG" -resize2dx 800,5,0 -text_outline "Archive",1,1,13,0.8,0.5 -outputw


The result of this is:
[gmic]-0./ Start G'MIC parser.
[gmic]-0./ Input file 'c:\Photos\DSCN0001.JPG' at position [0] (1 image 3264x2448x1x3).
[gmic]-1./ Resize 2d image [0] to 800 pixels along the x-axis, preserving 2d ratio.
[gmic]-1./ Draw outlined text 'Archive' at position (1,1) on image [0], with font height 13, outline 0.8, opacity 0.5 and color 255,255,255.
[gmic]-1./ Output image [0] as its initial location.
[gmic]-1./ End G'MIC parser.


... yet the source file does not change. If I run the same command without "-outputw", the reduced image appears on the screen with the "Archive" watermark as expected. The folder contains full read/write security permissions, the file is not read only. I can see no reason why the original file could not be overwritten. This same command has worked perfectly for roughly 200,000 files, but for some reason the last 100,000 across multiple different folders, is not working and I can't see why.

Does anyone have any suggestions to the cause? The application is running on Windows Server 2008R2.

Thanks in advance


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: G'MIC Trouble saving
PostPosted: Thu Nov 21, 2013 2:43 am  (#2) 
Offline
GimpChat Member
User avatar

Joined: Jan 03, 2011
Posts: 1656
Hi. Thanks for reporting.

I never had this kind of issue, but I'm running the command line tool 'gmic' mainly on linux.
May I ask you what version of 'gmic' do you use ? Is it something you compiled yourself, or did you use the Samj's 64bits version, or the Sourceforge 32bits version ?
Also, do the problematic files share something in common (maybe they have a space in their name ?).
If you run 'gmic' once again on these files, does it work for some of the files, or do they always fail ?

Maybe the command '-outputw' is the cause of the problem. Could you try replace it by '-output filename' instead, to see if that fixes the problem ?
Thanks.


Top
 Post subject: Re: G'MIC Trouble saving
PostPosted: Thu Nov 21, 2013 6:42 am  (#3) 
Offline
GimpChat Member

Joined: May 09, 2012
Posts: 914
Bonjour,

I tested these two command line without a problem :

gmic.exe "c:\Photos\DSCN0001.JPG" -resize2dx 800,5,0 -text_outline "Archive",1,1,13,0.8,0.5 -outputw
gmic.exe "c:\Photos\DSCN0001 é.JPG" -resize2dx 800,5,0 -text_outline "Archive",1,1,13,0.8,0.5 -outputw


Win 8.1 pro 64-bit
Archive G'MIC 64-bit : viewtopic.php?f=22&t=8993


Attachments:
tests_outputw_gmic.png
tests_outputw_gmic.png [ 11.26 KiB | Viewed 2878 times ]
Top
 Post subject: Re: G'MIC Trouble saving
PostPosted: Thu Nov 21, 2013 6:59 pm  (#4) 
Offline
New Member

Joined: Nov 20, 2013
Posts: 3
Thanks for all the responses.

The version running is the 32-bit SourceForge one.
There isn't anything common that I could see, though its possible they were all taken with the same digital camera. Practically every file is in a folder with a space and most work fine.

They're mostly DSCNxxxx.JPG files, have selected a handful and they display correctly to the screen (without "-outputw"), it doesn't appear to have an issue saving from the log above where when permissions or the "read-only" flag had been set on the file, G'MIC reported an access denied message.

Using "-output filename" works, but does not overwrite the original. I'll re-run the script across the drive with "-output" and have it reference the same filename as the original to save it and see what happens.

Strange that its worked fine on the majority of folders and not these handful.

Thanks for the responses :)


Top
 Post subject: Re: G'MIC Trouble saving
PostPosted: Fri Nov 22, 2013 2:43 am  (#5) 
Offline
GimpChat Member
User avatar

Joined: Jan 03, 2011
Posts: 1656
Yes, that is very strange indeed.
Please tell us if the regular output works as expected.


Top
 Post subject: Re: G'MIC Trouble saving
PostPosted: Tue Dec 03, 2013 1:49 am  (#6) 
Offline
New Member

Joined: Nov 20, 2013
Posts: 3
Sorry for the delay in getting back. I've tried running with the command "-output <filename>" and the program runs without error, yet the photo is not resized.

I've tried updating to the latest version (from here: sourceforge . net / projects / gmic / files/ - sorry, I'm too new a user to post URLs) but still no change. If the program writes to a new file/location, it works. I cannot get it to overwrite the original.


Top
 Post subject: Re: G'MIC Trouble saving
PostPosted: Tue Dec 03, 2013 6:01 am  (#7) 
Offline
GimpChat Member
User avatar

Joined: Jan 03, 2011
Posts: 1656
That must be something related to file permissions, or maybe synchronization with a distant drive, or something weird like this. :)
G'MIC uses regular file I/O functions to work, so it does behave the same way if your -output filename already exists or not.
There are no specific checking for this kind of particular cases.


Top
 Post subject: Re: G'MIC Trouble saving
PostPosted: Tue Dec 03, 2013 6:42 am  (#8) 
Offline
Global Moderator
User avatar

Joined: Apr 07, 2010
Posts: 14182
@BlackConvoy
You can post your images or URL's after five posts.

_________________
Image


Top
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Trouble exporting to .psd

2

No new posts Having trouble with plugins

2

No new posts Attachment(s) Trouble printing the correct size

6

No new posts Trouble importing third party Python packages to GIMP 2.10 so that the

0

No new posts palette not saving

0



* Login  



Powered by phpBB3 © phpBB Group