GIMP plugin: X11 mouse cursor

Paint programs, vector editors, 3d modelers, animation editors, etc.
Post Reply
Message
Author
carenrose
Posts: 36
Joined: Tue 11 Dec 2012, 03:22

GIMP plugin: X11 mouse cursor

#1 Post by carenrose »

I've never done this before!! So I hope everything works out okay, that I'm posting in the right area, that the pet works, and so forth!

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This is a plug-in for GIMP 2.6 and above which allows for importing and exporting X11 mouse cursor files. (File extension .xmc, but usually they have no file extension.)

The plugin was written by tkmashiw, but his site is long dead :(

Sorry for the super-dark theme.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

From the readme (attached below)
How to open a cursor
Because XMC has no specific file extension, it is a little complex to
load a cursor.
Open "Open" dialog, then you will find a combo box which shows
"All images" at right bottom side of the dialog.
You need to change it "All files", then you can find cursors you want
to open.
Note: All FILES, not All Images, the default.
How to save a cursor
Files which is appended file extension "xmc" are saved as XMC.
You can also save without extension by choosing "X11 Mouse Cursor"
without xmc one in the list of "Select File Type (By Extension)".
Yeah. It took me a while to figure out, this is *not* that little drop-down arrow menu. You have to click the thing that says "Select File Type (By Extension)."
Image dimensions must be no more than 128px, and you should reduce it
less than or equal to 64px because such a large cursor will clutter
your screen in some environments.
For more detail, read the source code of libXcursor.
If you want rename all [foo].xmc files in directory [mydir] to [foo],
open terminal and type similarly as follows.($ is not included.)
$ for file in [mydir]/*.xmc ; do mv $file ${file%.xmc} ; done

Save dialog
When you want to save XMC, you will asked some options by save dialog.
All save options are explained by tool tips or self-explaining, but
I complement more detail here.

* Hotspot X:, Y:
Hotspot coordinate from left top side of the image.
If the exporting image is imported from XMC or xbm file format,
Hotspot coordinates are automatically set by this plug-in.
Hotspot must be on all layer of image, or you will fail to save
the cursor.

* Auto-crop all frames
With this option, all frames' transparent borders are removed
before saving. This is useful for cursors which is converted by
"CursorXP/FX to X11 Mouse Theme Converter" and so large that X
cannot render properly.
This option is depends on the feature of XMC which can have
different hotspot coordinates for different frame, so the origin
of each frame's coordinate may become different.
Thus you had better to save without auto-crop if you want to edit
a saved cursor by other program. (for example, xcur2png ->
ImageMagick -> xcursorgen)
# You can restore transparent borders to set hotspots on same #
# coordinates by a script. #
# See http://d.hatena.ne.jp/tksmashiw/20081003 #

* Size:
Default (nominal) size.
Size has no relation with width and height of frames.
It is only used to determine which frame depends on which
animation sequence and which sequence is really used based on
the value of "gtk-cursor-theme-size".
This is the reason of name "nominal".
Gnome-appearance-properties only supports {12,16,24,32,36,40,48,64}
px, and if the size of left_ptr of your cursor theme is not one of
that, your cursor theme will disappear.
If you don't have plans to make multi-sized cursor, or you have no
idea, leave it "32px".
Size is stored in the layer name as "(XXps)", so you can edit it by
hand.

* Delay:
Delay is time span in which each frame is rendered. The unit is
millisecond. Delay is also stored in the layer name as "(XXms)".

* Copyright, License, Other
Optional comments which is stored in XMC's comment chunks.
At the moment, only this plug-in can write comments as long as I
know, so if you edit the saved cursor with other program, these
comments will be lost.
These comments are attached to image as parasites which names are
"xmc-copyright", "xmc-license", "gimp-comment" respectively.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Sorry for the super-dark theme in the screenshot.
Attachments
README.tar.gz
Just the original readme for your reference
(2.29 KiB) Downloaded 421 times
gimp-xmc-plugin-2.0.6.pet
(41.43 KiB) Downloaded 495 times
gimp-plugin-thing.png
(25.2 KiB) Downloaded 723 times

Post Reply