LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   modify an image with GIMP (https://www.linuxquestions.org/questions/linux-desktop-74/modify-an-image-with-gimp-615434/)

rblampain 01-22-2008 04:31 AM

modify an image with GIMP
 
I have an animated background image I created with PSP under windows95 many years ago, now I find it is tiling the screen too slowly, using 99% of cpu time to do the animation and I am thinking about making it bigger so that it loads faster but I have no experience with the Gimp and I have no need to learn it because this is the only animation I need.

This animation is very simple, it consists of 2 images of a number of gray pixels on a white background but in different locations so as to imitate the rain when the image is animated. The image is 16 pxl x 32 pxl and the .gif file is 146 bytes. So my need is to make the images bigger by using more than one tile as an image, an image big enough to fill a screen if necessary.

My questions are:
Is the procedure to make it bigger with GIMP (or other) easy enough that I can do the job by following a list of commands?

Would anyone provide the list of commands?

Failing that, my only option is to set up a machine with windows 95, relearn enough PSP and make the image bigger that way.

Thank you for your help.

pixellany 01-22-2008 05:13 AM

Quote:

Failing that, my only option is to set up a machine with windows 95, relearn enough PSP and make the image bigger that way.
With far less effort, you could learn GIMP quite thoroughly....;)

GIMP is not just for animation---it is a very powerful general-purpose image editor. Your best solution is to simply learn to use it.

If I understand your problem correctly, you want to use the existing image as a tile and combine several into a larger area. The basic procedure is to make a blank image of the desired size and the paste in the smaller image many times. I'm not sure how this works with animated GIFs (They open in GIMP as a set of layers.)

I wonder if ImageMagick has something for this......
BINGO!!!---the "montage" program (part of the ImageMagick package)
Do a Google using "tiling images imagemagick"

pixellany 01-22-2008 05:57 AM

PS: It's not so easy with montage----it seems to treat every layer in the animated gif as a separate image. There has to be an option to modify this behavior.......

hansalfredche 01-22-2008 10:23 AM

I don't know the command in english, but in Gimp you can resize the image and the layers (found in the menus with the respective name). If you still have the second Gimp window the layers will be visible there.

rblampain 01-23-2008 11:42 AM

Thank you for your answers, I have tried to learn it and I find it very complicated when you start from scratch, also, resizing is not really the solution because what is in the image must remain the same size, there must only be a bigger image with more of them. It is like if I had a small image with one letter "a", the letter must remain the same but a bigger image must contain many letters "a".

I think I may have found the solution with -> File -> Acquire -> Screen Shot etc but I have a problem with it so I have posted a new thread.

rblampain 01-24-2008 11:12 PM

As pixellany suggested, I learned enough about Gimp to solve the problem.

I ran a small HTML file containing only a link to the CSS file, that gave me a big animated image that I saved with the "Acquire" tool, I got one screen of each of the 2 images making the animation, I zoomed these images 16 times to find the exact pixels from which I wanted the final images to be, then I used the "Crop" tool which allows to enter the exact coordinates (x,y) from which to start, with the width and height of the wanted image and saved the resulting 2 files, I then opened the first file in the Gimp and dragged and dropped the second file on it, then saved the resulting single file as an animation.

I then experimented with various time delays to see what the CPU usages would be, (using the "top" command one member suggested in a previous post).

To change these settings was not difficult, open the file in the Gimp, click Dialogs -> Layers, a small windows appears showing the layers making the animation with the time delay between parentheses, double click on the text of the layer whose time delay you want to change, this gives it the focus, then position the cursor where you want to make a change, between the parentheses and click again, you can then use the keyboard keys to make the change.
Repeat the operation on other layers if necessary and then click the little "x" on the first line of this window, the one containing the word "Layers" and the file will be changed in memory.

Then save the file as an animation, there is no need to optimize it again. If you do, the name of the file is changed and you must name it again.

In my case and in order to lower the CPU usage to the point when the scrolling of the file was not visibly affected, it was necessary to change the settings so that the time delay was too large and the resulting image lost its meaning/impact completely (the animated image is imitating the rain). So I am now going to try to insert a extra blank layer with a time delay of one second so that the 2 other layers that have a time delay of 200ms can behave normally. If the result is satisfactory, I will keep the animated image, if not I'll have to throw it in the rubbish bin.

Hope this helps someone.

dive 01-26-2008 10:39 AM

I would love to see the rain gif. I'm always looking out for interesting backgrounds. Any chance of posting it?

rblampain 01-28-2008 02:12 AM

Yes, I can post it, you can use it, modify it etc, but how do I do that?

dive 01-28-2008 07:38 AM

Seems we cant upload pics here. You would need to upload it to an ftp or one of those free pic upload sites.

Or (easier) you could email to me at dave @ unrealize.co.uk and I can upload it to my ftp.

rblampain 02-05-2008 07:01 AM

To dive: I've sent an email to the address but it was returned saying there was no mail box for the addressee. I can easily explain what the gif image is.
It is 3 layers, each of 16 bytes by 32 bytes with a white background, only a few pixels are colored light gray in layer 1 and 2 while layer 3 is a white background with nothing else. Layer 1 and 2 run for 300ms each while layer 3 run for a full 1 second.
The gray pixels are as follows (row/col):
layer 1
7/7 8/8 9/9
13/1 14/2 15/3
28/15 29/16
layer 2
1/2 2/2 3/3
13/13 14/14 15/15
22/7 23/8 24/9
This imitates an intermittent drizzle more than the rain and is just visible. Initially, there was no layer 3 but this was consuming over 99% of CPU time on my main machine although this usage was reduced to 30% to 50% on another machine downloading from the net. Introducing the one second third layer reduced CPU consumption to less than 7% on my 19" lcd monitor while giving a reasonable graphical compromise.


All times are GMT -5. The time now is 10:13 PM.