Post Reply 

A few problems I need help with (GIMP on Ubuntu)

Jul 7, 2012, 03:07 (This post was last modified: Jul 7, 2012 05:58 by Uikri.)
Post: #1
Question A few problems I need help with (GIMP on Ubuntu)
So, I've been using GIMP for a couple of months now and really enjoy it, but I've run into a few problems as of late.

The first thing is that I'm trying to make a .gif image using a main image and then the .gif being just a little piece that's animated. The problem is, when I add that .gif image and try to save the whole thing as .gif, it says "The image you are trying to save as a GIF contains layers which extend beyond the actual borders of the image, etc., etc." I've tried extending the boundaries of the layers that comprise the .gif as a test, but that still didn't work, and it ended up playing all the individual layers as part of the animation. So what I'm wanting to know is, how do I make it where I can add a .gif image to an otherwise un-animated image and still save the whole thing as a .gif?

The second problem I'm having is that when I choose "Open as Layer..." as of late, the new layer image takes on the color palette of the other layers, making it look very odd and leaving me having to open another instance of GIMP and copy/paste whatever image I wanted to add as a new layer to keep the colors normal. What might be causing this problem, and would there be a solution besides uninstalling/reinstalling GIMP? EDIT: Nevermind. Even uninstalling and reinstalling did not fix the problem. How do I fix it? Or at least, how can I manually copy/paste a .gif, layer by layer, and still have it function as a .gif, or would I have to learn how to animate?

The third is minor and probably easily figured out, but how do I update GIMP on Ubuntu? I'm still on 2.6 and 2.8 hasn't popped up in the little update manager.

Attached are the .xcf files for before and after I open a new layer to show what happens to the colors.


Attached File(s)
.xcf  dd0a4e64ab4a116833323caf1118acfac351ff06cfb1ed1c9 (copy 2).xcf (Size: 91.44 KB / Downloads: 84)
.xcf  dd0a4e64ab4a116833323caf1118acfac351ff06cfb1ed1c9 (copy 3).xcf (Size: 122.4 KB / Downloads: 64)
Find all posts by this user
Quote this message in a reply
Jul 7, 2012, 08:27 (This post was last modified: Jul 7, 2012 08:54 by Uikri.)
Post: #2
RE: A few problems I need help with (GIMP on Ubuntu)
(Jul 7, 2012 07:50)ofnuts Wrote:  
(Jul 7, 2012 03:07)Uikri Wrote:  The first thing is that I'm trying to make a .gif image using a main image and then the .gif being just a little piece that's animated. The problem is, when I add that .gif image and try to save the whole thing as .gif, it says "The image you are trying to save as a GIF contains layers which extend beyond the actual borders of the image, etc., etc." I've tried extending the boundaries of the layers that comprise the .gif as a test, but that still didn't work, and it ended up playing all the individual layers as part of the animation. So what I'm wanting to know is, how do I make it where I can add a .gif image to an otherwise un-animated image and still save the whole thing as a .gif?
Your problem has little to do with GIF. If you do "Image/Fit canvas to layers", you find that your image becomes 2 pixels wider... this means you indeed have a layer that bleeds off the canvas. Since that's only two pixels it is not too easy to spot (it's "Pasted Layer#1"). But you can consider that since you don't see it and the image looks OK you can bluntly re-crop the image to its current size and this will cut off any off-canvas layer bits. You can also use "Layer/Autocrop layer" to remove all the unnecessary border transparency in your layers.

Firstly, thank you so much for clearing this up. I can't believe I missed something so obvious.

(Jul 7, 2012 07:50)ofnuts Wrote:  "the color palette of the other layers" is your problem. There is no such thing. Since your image is indexed, there is a color palette for your image and all layers have to use it. So added layers are converted to indexed mode and must use the palette. You can convert the image back to full RGB (Image/Mode/RGB) and then edit ti it, and convert it back to indexed (implicitly, when saving to GIF, or explicitly using Image/Mode/Indexed (which gives you more control). But your color palette is currently 241 colors ("Windows/Dockable dialogs/Color palette") so you only have 16 colors left for additional stuff, so strange things could happen to the rest of the picture if you let Gimp do this automatically. What you can do (before changing mode to RGB and importing the new layers) is:
- start Palettes list,
- right click -> import palette
- in the dialog: from image and select your image
- name the palette with a meaningful name
- so you now have a 241 color palette
- add to it the colors for your added layers
- switch to RGB mode
- add layers
- convert explicitly to indexed before saving to GIF, using this palette.

But on the whole editing GIF is a bad idea, GIF is a "final" format and GIF images are about as editable as PDF/EPS files,

Okay, I converted the image to full RGB (which I have used for all my projects before this one, I just didn't know it got switched up here), and the text messed up a little, but I can easily fix that. Is there any reason not to keep the image in RGB? It's not like I intentionally had the image on indexed. Also, I can't figure out how to get to the palettes list. How would I do that? Well, all I'm really trying to do is put a GIF in an otherwise unanimated image. Though regarding that, when I saved it during the test, it played every single layer of the image as an animation, not just the originally animated sprite. How would I fix that?

(Jul 7, 2012 07:50)ofnuts Wrote:  I'm surprised a Linux user thinks reinstalling stuff is going to fix anything. Linux users know better. Recent convert perhaps?

Semi-recent. I've had Ubuntu for a about a year now, if I'm not mistaken. I just thought maybe I had somehow messed something up since, whenever I leave the computer running without locking the screen, the launcher and the top of fullscreen windows gets all garbled until I log off and log back on.

(Jul 7, 2012 03:07)Uikri Wrote:  The third is minor and probably easily figured out, but how do I update GIMP on Ubuntu? I'm still on 2.6 and 2.8 hasn't popped up in the little update manager.
(Jul 7, 2012 07:50)ofnuts Wrote:  Welcome to Ubuntu... Ubuntu's policy is to not update software (just fix bugs, and mostly security ones) withing a release. So don't hold your breath waiting for updates for your distro. You may find a PPA with 2.8, but this requires a recent distro anyway because 2.8 has dependencies on GLIB. With older versions there is a dependencies avalanche. To install Gimp you have to install more recent versions of Glib, which may mean upgrading some other software... Another solution is to recompile the whole set (Gimp/Gegl/Babl/Glib for /opt). But 2.8 isn't that reliable right now, and 2.6 is rock-solid so I won't bother before 2.8.2 (running 2.6.8 on Lucid Lynx currently).

Sounds like I should just wait. I'm fine with that.

(Jul 7, 2012 07:50)ofnuts Wrote:  Looking at the file names (and the name of the layers inside them): you won't get very far in this trade if you don't get into the habit to give readable, mnemonic and descriptive names to things (even in quick-and-dirty tests).

I usually keep with the normal file names until the finished project. Also, a lot of the files have names that mean something that I recognize, so it all works out in the end. If I gave a special name to every file I saved, I would be naming files for hours.
Find all posts by this user
Quote this message in a reply
Jul 7, 2012, 08:38 (This post was last modified: Jul 7, 2012 08:52 by rich2005.)
Post: #3
RE: A few problems I need help with (GIMP on Ubuntu)
As well as all the above excellent advice.

Quote:...So what I'm wanting to know is, how do I make it where I can add a .gif image to an otherwise un-animated image and still save the whole thing as a .gif?

see: http://www.gimp.org/tutorials/Simple_Animations/
section 5 which explains optimizing an animation.

Gimp 2.8
I am with Ofnuts on this, I do have a Gimp 2.8 in a LinuxMint Debian, originally installed from an Ubuntu PPA then changed it to installing from debian testing. As well as the improvements I do find 2.8 has some annoying features, brush sizing is one, all put together for most of the simple editing I do, mainly DVD graphics/photography gimp 2.6 still has the margin on productivity. Don't rush into changing.
On the other hand, maybe give this one a go http://portablelinuxapps.org/graphics
I had this portable 2.8 (edit: actually a 2.7.2) running in a Bodhi E17 (ubuntu remix) netbook, several problems with resources, brushes etc. but amazingly it did run. Only one file but it does make a ~/.gimp-2.8 folder

** https://www.gimp-forum.net/ now answering questions**
Find all posts by this user
Quote this message in a reply
Jul 7, 2012, 09:05
Post: #4
RE: A few problems I need help with (GIMP on Ubuntu)
(Jul 7, 2012 08:38)rich2005 Wrote:  see: http://www.gimp.org/tutorials/Simple_Animations/
section 5 which explains optimizing an animation.

Please tell me I don't have to do anything but follow simple directions, because I started seeing things like "alpha to selection" which I have no idea about. Other than that thank you for the link.
Find all posts by this user
Quote this message in a reply
Jul 7, 2012, 11:15
Post: #5
RE: A few problems I need help with (GIMP on Ubuntu)
Quote:Please tell me I don't have to do anything but follow simple directions, because I started seeing things like "alpha to selection" which I have no idea about. Other than that thank you for the link.

Ouch, Thats me told off. It is actually quite clear but for a one-click fix
I took your ....(copy3).xcf applied Filters -> Animation -> Optimise (for Gif).
That seems to play ok.
screenshots for comparison. http://i.imgur.com/dscwM.jpg

** https://www.gimp-forum.net/ now answering questions**
Find all posts by this user
Quote this message in a reply
Jul 7, 2012, 16:39
Post: #6
RE: A few problems I need help with (GIMP on Ubuntu)
(Jul 7, 2012 11:15)rich2005 Wrote:  Ouch, Thats me told off. It is actually quite clear but for a one-click fix
I took your ....(copy3).xcf applied Filters -> Animation -> Optimise (for Gif).
That seems to play ok.
screenshots for comparison. http://i.imgur.com/dscwM.jpg

Sorry, I've only been using GIMP since mid May ^^; And yes, that seemed to make it play fine, but how would I make it only play that weird-colored sprite as an animation, and not every layer in the image?
Find all posts by this user
Quote this message in a reply
Jul 7, 2012, 18:10
Post: #7
RE: A few problems I need help with (GIMP on Ubuntu)
(Jul 7, 2012 09:45)ofnuts Wrote:  When you open a GIF in Gimp, the image is set to indexed directly, using the colormap in the GIF of course.

A good reason not to keep yout image in RGB is that since you started from a GIF, its colors are already quantized. If you use RGB you may have problems when saving as GIF because you'll then discover that you have tough choices to make for the colormap. Using indexed at least keeps you on your toes during the whole editing process, as you have discovered. If you had start from RGB thing could have been different (and keeping RGB as late as possible would have been an option).

Actually, I started from a PNG file. Would that make any difference?

(Jul 7, 2012 09:45)ofnuts Wrote:  The palettes list is in "Windows/Dockable dialogs/Palettes".

I'm not too expert in GIF animations. There are basically two modes for layers, "replace" or "combine" (IIRC there is a third mode but Gimp doesn't know how to use it, see GIF on Wikipedia for details). In replace mode the frame completely replaces the image, while in "combine" it is added to the existing (used for text that appears, for instance). So in your case that would mean duplicating your background N times, and merging the sprite layers on each... I happen to have a script that does just the opposite, given a fixed layer it will overlay it on all frames... Fixing it up should be a SMOP and the weekend is going to be rainy round here...

Well, I could use the duplication method, but are you saying you'd be willing to share that script?
Find all posts by this user
Quote this message in a reply
Jul 10, 2012, 02:31 (This post was last modified: Jul 10, 2012 05:10 by Uikri.)
Post: #8
RE: A few problems I need help with (GIMP on Ubuntu)
(Jul 9, 2012 19:31)ofnuts Wrote:  interleave-layers now with "sprite" mode: http://gimp-tools.sourceforge.net/

Awesome. Many thanks! But, how do I use it? I put the file in the specified folder, then closed and reopened GIMP, but the only thing visible when I highlight "Python-fu" is "console".

Attached is what I'm currently working on, since I decided to not animate the first project. Also, how do I set the length that each frame is played for? E.G. 50ms, 100ms, etc.? It tells me how long it plays for at the bottom, but I want to be able to change it if I need to. Edit: How do I switch between "combine" and "replace"? Combine sounds like it would make it where I don't have to duplicate the BG X number of times.Second Edit: Also attached is my current progress using the duplication method to turn the whole picture into a .gif, as well as the .xcf file that pertains to it. What did I do wrong to make it play like that?


Attached File(s) Thumbnail(s)
   

.xcf  zack\'s card 4.xcf (Size: 143.36 KB / Downloads: 59)
.xcf  zack\'s card 5.xcf (Size: 547.84 KB / Downloads: 52)
Find all posts by this user
Quote this message in a reply
Jul 10, 2012, 08:11 (This post was last modified: Jul 10, 2012 08:22 by Uikri.)
Post: #9
RE: A few problems I need help with (GIMP on Ubuntu)
(Jul 10, 2012 07:19)ofnuts Wrote:  
(Jul 10, 2012 02:31)Uikri Wrote:  
(Jul 9, 2012 19:31)ofnuts Wrote:  interleave-layers now with "sprite" mode: http://gimp-tools.sourceforge.net/

Awesome. Many thanks! But, how do I use it? I put the file in the specified folder, then closed and reopened GIMP, but the only thing visible when I highlight "Python-fu" is "console".
The page above haas an "Animation tools" link at the top right, where you'll find a complete write up...

(Jul 10, 2012 02:31)Uikri Wrote:  Attached is what I'm currently working on, since I decided to not animate the first project. Also, how do I set the length that each frame is played for? E.G. 50ms, 100ms, etc.? It tells me how long it plays for at the bottom, but I want to be able to change it if I need to. Edit: How do I switch between "combine" and "replace"? Combine sounds like it would make it where I don't have to duplicate the BG X number of times.Second Edit: Also attached is my current progress using the duplication method to turn the whole picture into a .gif, as well as the .xcf file that pertains to it. What did I do wrong to make it play like that?
Frame duratation, as well as athe combine/replace mode can be put in parentheses in the layer name:
Code:
Some long frame (500ms)
Some added frame (combine) (100ms)
"Combine" doesn't remove the contents of the previous frame, it is completely additive, so you can't use it for a mobile image part over a background. It may work to replace part of the background, though. And "replace" replaces the whole image so "replace" with a frame that just contains an arm hasn't much to show. You have to generate all full frames and use them in "replace" mode. You can after that run the animation optimizer.

Argh, this is starting to frustrate me. Sad Let's go one step at a time. Why doesn't interleave layers show up when I highlight the "Image" tab?
Find all posts by this user
Quote this message in a reply
Jul 10, 2012, 08:43 (This post was last modified: Jul 10, 2012 09:00 by Uikri.)
Post: #10
RE: A few problems I need help with (GIMP on Ubuntu)
(Jul 10, 2012 08:30)ofnuts Wrote:  Did you follow the instructions in the sidebar in the web page? In what directory did you put the .py file? Do you have a "python-fu" entry at the bottom of "Filters"

Indeed I did. I put the .py file in the home/.gimp-2.6/plugins folder, as instructed. I then closed and restarted GIMP (a couple of times to be sure), and there is no option labeled as "Interleave Layers" when highlighting the "Image" tab. Wait, I just realized I missed something. What does it mean to "set the executable flag"? Is that where it says "allow executing of file as program"?Edit: Alright, I got "Interleave Layers" to show up, used sprite mode, and it still did the weird flashing thing (attached). Decided to optimize for GIF and then use interleaving (again, sprite mode), and it is still messing up. What did I do wrong?


Attached File(s) Thumbnail(s)
   
Find all posts by this user
Quote this message in a reply
Jul 10, 2012, 20:36 (This post was last modified: Jul 10, 2012 20:46 by Uikri.)
Post: #11
RE: A few problems I need help with (GIMP on Ubuntu)
(Jul 10, 2012 11:13)ofnuts Wrote:  Reopen your GIF in Gimp and is is quite obvious. In Frame 4 the character is no longer here, except a bit of the cap, in frame 5 he has the legs cut off... you should have a complete character on all layers before you add the background. Or, if the legs don't move at all, they can be part of the background layer but you should have a complete character from the torso up on all layers.

I can't do that. The sprite doesn't come that way ._. Is there anything I can do in that case?
Find all posts by this user
Quote this message in a reply
Jul 11, 2012, 00:47 (This post was last modified: Jul 11, 2012 00:48 by Uikri.)
Post: #12
RE: A few problems I need help with (GIMP on Ubuntu)
(Jul 10, 2012 22:38)ofnuts Wrote:  I can't do that. The sprite doesn't come that way

Uh? Just merge your character layers so that you have N layers will a complete character on them (in a different pose of course). Then apply the script in sprite mode...

But that wouldn't work because the arm or legs might not be in the right position, and so it wouldn't look right. If there's any confusion, I did not make these sprites myself, and I do not know how to make sprites.
Find all posts by this user
Quote this message in a reply
Jul 11, 2012, 09:17
Post: #13
RE: A few problems I need help with (GIMP on Ubuntu)
(Jul 11, 2012 07:03)ofnuts Wrote:  
(Jul 11, 2012 00:47)Uikri Wrote:  
(Jul 10, 2012 22:38)ofnuts Wrote:  I can't do that. The sprite doesn't come that way

Uh? Just merge your character layers so that you have N layers will a complete character on them (in a different pose of course). Then apply the script in sprite mode...

But that wouldn't work because the arm or legs might not be in the right position, and so it wouldn't look right. If there's any confusion, I did not make these sprites myself, and I do not know how to make sprites.
"Sprite" is just a word for animated things over a fixed background. In early days, they could be fed to special circuitry in the video card, that would take insert them in the video (there wasn't enough bandwidth to change the whole image on the fly at 25FPS). Your character behaves like a sprite...

Of course, you have to reconstruct 15-20 versions of your character using the partial images, but that doesn't require anything special. If the original GIF does it, all you have to do is duplicate & merge the right pieces. For instance is a movement is produced by
body+arm1, then body+arm2 you have to create layers with torso+arm1 and torso+arm2.

So, maybe what I'm trying to do is a little more ambitious than I thought, huh? Would there be a guide I could follow to do what you're suggesting, or anywhere I could find step-by-step instructions? Or do I have to just work at it until I learn it myself?
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Blurry GIMP interface on macOS High Sierra 10.13.6 vagkavo 1 177 Aug 26, 2018 07:52
Last Post: paynekj
  Gimp wont keep merging when exporting Ergu 1 233 Aug 8, 2018 21:22
Last Post: paynekj
  Printers not showing in gimp chrismacor 1 249 May 24, 2018 06:03
Last Post: paynekj
  Gimp 2.8 wont't see my wcoom bamboo tablet NullPointer 1 346 May 22, 2018 12:53
Last Post: paynekj
  Gimp compatibility katie98 1 249 May 22, 2018 05:53
Last Post: paynekj

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS