Need help making XPM icons

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
  09 September 2012
Need help making XPM icons

I'm trying to create XPM icons for Maya using Autodesk's in-house converter: imgcvt.exe , and although I can convert bmp's to xpm just fine, I never get the transparency.

I've tried converting 16 bit ARGB 5-5-5 BMP's into XPM: both the X1 and A1 options (in Photoshop) as well as 32 bit ARGB. Imgcvt does not like 32 bit ARGB bitmaps though and gives me an error saying its a bad image format.

Exactly what BMP format do I need to get transparency in my XPM files?
Or am I missing some command/flag when converting? Right now I just write imgcvt $bmpName $xpmName
__________________
Nightshade UV Editor (script for Maya) - Extends Maya's default UV Texture Editor with additional tools.
 
  09 September 2012
Nvm I found out how to do it.

In case someone wonders, this is how to make transparent XPM's.

1) Tag the transparency with a color inside the image. I personally use magic pink (magenta: 255 0 255 , FF00FF) and fill that color on a new layer that I put behind everything else.

2) I save as 24 bit BMP (RGB 8-8-8)

3) I use the windows command prompt (type cmd in the run window) and navigate to the folder containing the bmp(s) and then I convert them to xpm by writing
imgcvt myIcon.bmp myIcon.xpm

4) Now you need to hack the xpm file, so open the xpm file in a text editor

5) Find the HEX value of your background color (in my case it's #FF00FF), remove the HEX value and type "none" without the quotation marks. Like this:
/* XPM */
static char * image_name[]={
"24 24 15 2",
"  	c #DA322D",
". 	c none",


6) Place the xpm in the my documents\maya\ VERSION \prefs\icons -folder

7) WIN
__________________
Nightshade UV Editor (script for Maya) - Extends Maya's default UV Texture Editor with additional tools.
 
  09 September 2012
xpm is only used in older pre-2011 versions of Maya for OS X and Linux. Use PNGs. They work in 2011 and above with all platforms.
 
  09 September 2012
Yes I'm well aware of that.
I made this thread because I wanted my latest script to work for Maya 2009, 2010 and 2011.
I ended up making separate versions of the icons instead - converting to XPM was just too damn slow.
__________________
Nightshade UV Editor (script for Maya) - Extends Maya's default UV Texture Editor with additional tools.
 
  09 September 2012
Online Converter

Here is an online site that will do it for you for free: Online Image Conversion

Go to 'Select other output format' and scroll down - XPM is there.

Not sure how it handles transparency but it is still a good resource.

-N
 
  09 September 2012
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 03:08 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.