Jump to content


Photo

[GRAPHICS] Converting BMP to BAM


  • Please log in to reply
16 replies to this topic

#1 yarpen

yarpen

    Drunken Superhero

  • Member
  • 257 posts

Posted 15 May 2009 - 03:10 AM

Can someone give a hand and convert these BMPs to useful in-game BAMs? Maybe as an exchange I can try to create spell icons for someone. :)
Posted Image
(it's only a preview - bams are in archive).

Attached Files


Edited by yarpen, 15 May 2009 - 03:14 AM.


#2 Lava Del'Vortel

Lava Del'Vortel

    Fiction Enforcer

  • Modder
  • 2298 posts

Posted 15 May 2009 - 05:12 AM

those 3 from archive changed into bams.

Attached Files



#3 yarpen

yarpen

    Drunken Superhero

  • Member
  • 257 posts

Posted 15 May 2009 - 07:17 AM

Thanks. Is there a chance for doing that without loosing a quality? Icons colours are much simplified. I was using colours which were present in standard BG2 bams.

Edited by yarpen, 15 May 2009 - 07:19 AM.


#4 Daulmakan

Daulmakan

    Comfortably numb

  • Member
  • 1065 posts

Posted 15 May 2009 - 09:04 AM

I'm not sure what's going on, sorry about the double posts.

Attached Files

  • Attached File  BAMs.rar   3.35K   310 downloads

Edited by Daulmakan, 15 May 2009 - 09:07 AM.

item_pack.jpg   Drows.jpg

 


#5 Lava Del'Vortel

Lava Del'Vortel

    Fiction Enforcer

  • Modder
  • 2298 posts

Posted 15 May 2009 - 09:48 AM

Well, I did not realized that, but as we can see - aye, there is a way.

#6 yarpen

yarpen

    Drunken Superhero

  • Member
  • 257 posts

Posted 15 May 2009 - 09:50 AM

C00l, thanks for help :)

#7 Galan

Galan
  • Member
  • 28 posts

Posted 15 May 2009 - 01:44 PM

If you have php on your system, you could use this (quick and dirty =]) script: Attached File  img2bam.php   5.03K   407 downloads
If your image has less then 256 colours, it works on almost anything: gif, jpeg, png, bmp (not recommended, since php does not have native bmp support)... i think... (didnt really test it yet)

(BAM Workshop seems to fill the palette no matter how many colors are used in the image oO)

Edited by Galan, 15 May 2009 - 01:44 PM.


#8 SConrad

SConrad

    I swear to drunk I'm not God

  • Administrator
  • 11148 posts

Posted 15 May 2009 - 11:05 PM

If you have php on your system, you could use this (quick and dirty =]) script: Attached File  img2bam.php   5.03K   407 downloads

What's this? I don't recall seeing it before. Did you make it?

Posted Image Khadion NPC mod - Team leader, head designer
Posted Image Hubelpot NPC mod - Team leader, coder
Posted Image NPC Damage - Coder
Posted Image PC Soundsets - Coder, voice actor
Posted Image Brythe NPC mod - Designer
Posted Image DragonLance TC - Glory of Istar - Designer
Posted Image The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
Posted Image The Jerry Zinger Show - Producer

Iron Modder 5 - Winner


#9 Galan

Galan
  • Member
  • 28 posts

Posted 16 May 2009 - 04:07 AM

yes :)
with WeiDu I got interested in that kind of coding =)
PHP may not be the fastest solution for this, but well it's the language I'm most familiar with...

#10 SConrad

SConrad

    I swear to drunk I'm not God

  • Administrator
  • 11148 posts

Posted 16 May 2009 - 05:28 PM

It's a bit of an unconventional solution, but if it works!

The only real problem I can see is that not many people have access to a webserver--and setting one up at your own computer just for using this might be overkill. With that in mind, it might be an idea to upload it to a website somewhere, where people can convert images through a file upload. We could do it right here on SHS, if you want to. :)

Posted Image Khadion NPC mod - Team leader, head designer
Posted Image Hubelpot NPC mod - Team leader, coder
Posted Image NPC Damage - Coder
Posted Image PC Soundsets - Coder, voice actor
Posted Image Brythe NPC mod - Designer
Posted Image DragonLance TC - Glory of Istar - Designer
Posted Image The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
Posted Image The Jerry Zinger Show - Producer

Iron Modder 5 - Winner


#11 Deratiseur

Deratiseur
  • Member
  • 86 posts

Posted 16 May 2009 - 10:57 PM

Why doesn't anyone speaking about the Item Graphics Converter from TeamBG ? (ouch, sorry , i'm a french guy :-/)

The site is down for the moment, but someone have surely the tool in his hard drive, as i have.

All my mods are on Github


#12 Galan

Galan
  • Member
  • 28 posts

Posted 18 May 2009 - 07:29 AM

Here's the new version with RLE-Encoding: Attached File  img2bam.php   6.63K   314 downloads
It still doesn't work too well on images with more than 256 colors, but this is as far as PHP goes, i guess...

Now you can download it as an exe: Attached File  img2bam.rar   832.34K   387 downloads

@SConrad: I don't really think people will really use this script online, if they can download the exe... If you think otherwise, go ahead :]

#13 SConrad

SConrad

    I swear to drunk I'm not God

  • Administrator
  • 11148 posts

Posted 18 May 2009 - 08:15 AM

.exe files are probably better than an online file upload, but you'll need to provide documentation for how to use the executable. :)

Posted Image Khadion NPC mod - Team leader, head designer
Posted Image Hubelpot NPC mod - Team leader, coder
Posted Image NPC Damage - Coder
Posted Image PC Soundsets - Coder, voice actor
Posted Image Brythe NPC mod - Designer
Posted Image DragonLance TC - Glory of Istar - Designer
Posted Image The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
Posted Image The Jerry Zinger Show - Producer

Iron Modder 5 - Winner


#14 Galan

Galan
  • Member
  • 28 posts

Posted 18 May 2009 - 08:29 AM

Just run the .exe from the CLI, so it won't close immediantly:

Usage:
       img2bam [Options] [Files]
Options:
       -C                No RLE-Compression



#15 Miloch

Miloch

    Barbarian

  • Modder
  • 6573 posts

Posted 18 May 2009 - 01:36 PM

Can you assemble complex BAMs with this, such as creature animations? Ideally, I'd like an automated tool to dissemble and reassemble them (and even edit them a la TeamBG's Photoshop plug-in for MOS, PLT and TIS files, but that's another story).

The main problem with inventory (and description and spell) BAMs is getting the graphics to look right before assembling the BAM. Putting the BAM together is child's play compared with that.

Also, you should always downsample your graphics to 256 colours (8-bit) before putting the BAM together. I use PaintShop to do this with an octree optimised palette, error diffusion and colour bleeding reduction. This results in almost zero loss in most cases. If you try to automate this without those kinds of settings, your graphics can look incredibly crappy.

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#16 Galan

Galan
  • Member
  • 28 posts

Posted 19 May 2009 - 04:22 AM

Can you assemble complex BAMs with this, such as creature animations? Ideally, I'd like an automated tool to dissemble and reassemble them

Actually, I never intended to do such a complex script, I was just playing around... But I'll have a look at it... =]

Also, you should always downsample your graphics to 256 colours (8-bit) before putting the BAM together. I use PaintShop to do this with an octree optimised palette, error diffusion and colour bleeding reduction. This results in almost zero loss in most cases. If you try to automate this without those kinds of settings, your graphics can look incredibly crappy.

Of course, but PHP isnt that good at downsampling to a palette :/

#17 -NORICOLLINS-

-NORICOLLINS-
  • Guest

Posted 17 May 2017 - 01:26 AM

Hello, i need your suggestions for online storage i have more than 20GB data and i need a reliable sorce to save all my data online currently i am using "Furious Blue"
1]: [click here
http://furiousblue.com/
Hello, i need your suggestions for online storage i have more than 20GB data and i need a reliable sorce to save all my data online currently i am using "Furious Blue"
1]: [click here
http://furiousblue.com/