RSS/Atom feed Twitter
Site is read-only, email is disabled

Close Image from Script

This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

3 of 3 messages available
Toggle history

Please log in to manage your subscriptions.

Close Image from Script Kevin Myers 20 Oct 01:18
  Close Image from Script Sven Neumann 21 Oct 10:49
Close Image from Script Kevin Myers 20 Oct 17:00
Kevin Myers
2002-10-20 01:18:23 UTC (over 21 years ago)

Close Image from Script

Hello -

How can a script-fu script close an open image? I've searched all through the PDB and can't seem to find a way. I can load images, save images, create new images, and list open images, but I can't find any way to close an open image! What am I missing??? Thanks.

Kevin M.

P.S. - I apologize for the duplicate postings, but so far I haven't found which is the best list to post script related questions to.

Kevin Myers
2002-10-20 17:00:14 UTC (over 21 years ago)

Close Image from Script

Hi David -

Thanks for your reply. Yes, gimp-image-delete is what I needed. Several other folks have also responded with the same answer. The reason that I overlooked this is that I failed to associate "deleting" an image (which I think of as deleting the permanent file on disk) with closing the image. I wasn't talking about closing the display. In fact, since I'm working on batch mode scripts, a display will not be involved at all. I just need to close an image to free its associated memory after I'm done processing that image and ready to move on to another one.

What am I up to? Working at digital archiving images of well logs for the oil and gas industry. Up to a foot wide by several hundred feet in length. Far too many and far too time consuming to work with all of them manually, therefore need to use batch mode. Require custom scripts and plug-ins to perform several image cleanup steps that aren't included among the capabilities that get installed with the gimp. Must deal with varying brightness and contrast, smudges, stains, and reproduction anomalies, both between different images, AND within a single image. Also, must reduce color levels to facilitate image compression, while maintaining all significant image details as closely as possible. Not an easy thing to do, even when each log image is tackled manually by an experienced user. I have developed plug-ins to perform the specific types of image cleanup that I need. Now I'm working on scripts to combine those along with other supplied gimp capabilities to perform the complete set of tasks that are needed for each image.

The scripts that I'm coming up with are very simple and basic, it's the plug-ins that do the really tricky stuff. The only problems that I have right now are the following two issues:

1. I can't figure out anyway to pass a string argument (which requires double quotes) from the command line under Windows. Something drops or otherwise mangles the quotes along the way, and I'm pretty certain that the command shell interpreter is NOT responsible for them getting dropped. I'm considering some possibilities for working around this problem, but they are really ugly...

2. I seem to be running into some kind of size limit, and I'm very worried that it may be exactly the same maximum image size that is supported by ImageMagick. That limit is defined by 2GB max addressable space for a user program under Windows, divided by 5 bytes per pixel (R, G, B, alpha, index). Whether or not it is really the same problem, I am definitely running into some kind of a bug or limitation somewhere just a little over 400 mega pixels with my grayscale images.

s/KAM

----- Original Message ----- From: "David Hodson"
To: "Kevin Myers"
Sent: Sunday, October 20, 2002 8:48 AM Subject: Re: [Gimp-user] Close Image from Script

Kevin Myers wrote:

How can a script-fu script close an open image? I've searched all

through

the PDB and can't seem to find a way. I can load images, save images, create new images, and list open images, but I can't find any way to

close

an open image! What am I missing??? Thanks.

Delete the image, or close the display? Don't know about script-fu, but using the procedural interface from C, they're different things. An image may (or may not) have one or more displays. Displays can be opened (on a particular image) and closed, and an image can be deleted when all its displays are closed. (IIRC).

(Hmm... ultra large images? Batch processing? What are you up to?)

-- David Hodson -- this night wounds time

Sven Neumann
2002-10-21 10:49:25 UTC (over 21 years ago)

Close Image from Script

Hi,

"Kevin Myers" writes:

How can a script-fu script close an open image? I've searched all through the PDB and can't seem to find a way. I can load images, save images, create new images, and list open images, but I can't find any way to close an open image! What am I missing??? Thanks.

gimp-image-delete ?!

Salut, Sven