LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Reply
 
Search this Thread
Old 01-22-2008, 04:31 AM   #1
rblampain
Member
 
Registered: Aug 2004
Location: Western Australia
Distribution: Debian 7
Posts: 837

Rep: Reputation: 35
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.
 
Old 01-22-2008, 05:13 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
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"

Last edited by pixellany; 01-22-2008 at 05:21 AM.
 
Old 01-22-2008, 05:57 AM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
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.......
 
Old 01-22-2008, 10:23 AM   #4
hansalfredche
Member
 
Registered: Jun 2005
Posts: 445

Rep: Reputation: 31
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.
 
Old 01-23-2008, 11:42 AM   #5
rblampain
Member
 
Registered: Aug 2004
Location: Western Australia
Distribution: Debian 7
Posts: 837

Original Poster
Rep: Reputation: 35
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.
 
Old 01-24-2008, 11:12 PM   #6
rblampain
Member
 
Registered: Aug 2004
Location: Western Australia
Distribution: Debian 7
Posts: 837

Original Poster
Rep: Reputation: 35
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.
 
Old 01-26-2008, 10:39 AM   #7
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,211

Rep: Reputation: 293Reputation: 293Reputation: 293
I would love to see the rain gif. I'm always looking out for interesting backgrounds. Any chance of posting it?
 
Old 01-28-2008, 02:12 AM   #8
rblampain
Member
 
Registered: Aug 2004
Location: Western Australia
Distribution: Debian 7
Posts: 837

Original Poster
Rep: Reputation: 35
Yes, I can post it, you can use it, modify it etc, but how do I do that?
 
Old 01-28-2008, 07:38 AM   #9
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,211

Rep: Reputation: 293Reputation: 293Reputation: 293
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.
 
Old 02-05-2008, 07:01 AM   #10
rblampain
Member
 
Registered: Aug 2004
Location: Western Australia
Distribution: Debian 7
Posts: 837

Original Poster
Rep: Reputation: 35
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
modify linux iso image xelnt Linux - General 6 07-15-2010 06:41 PM
How to modify Mandriva 2007.1 dvd iso image? dedexes Mandriva 2 07-13-2007 02:05 AM
program to modify iso image shanenin Linux - Software 6 08-26-2006 06:15 AM
modify text of an jpg file on linux with gimp 2.0.4 tcma Linux - Software 1 10-19-2004 11:12 AM
howto modify the image on the screen after logging in?? rohan208 Linux - General 3 07-13-2004 11:48 PM


All times are GMT -5. The time now is 11:29 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration