BMP-to-CPU In-Game Converter [WIRE]

I can’t call this “release” but I put this script here. There is simple console-ingame converter from .bmp to Digital Screen using gm_image module.

http://s3.garrysmod.org/img/cache/1/0/0/8/1/4/218d8d91a9620cebcc6e3f695433c0dd.jpg

(sorry for low-graphics and low resolution of picture on the screen - my computer extremelly old)

Command:

wire_expression2_createbmp <image.bmp> <txt_filename>

Speed limited at 20480 pixels-at-second because of the module (if there will be just loop - it can crash super-powerful computer, not mine, with “not enough memory”). Warning: on low-end computers process will be MUCH longer, especially at writing in .txt . On my computer (Pentiuim IV 2.4 ) image 128x128 converted in 8 seconds.

How to convert:

  1. Put your bmp-image in %USERNAME%/garrysmod/garrysmod
  2. Connect on any server/go in single
  3. Convert (see command above)
  4. After converting - open “Chip - CPU” and press “Update”.
  5. Choose your file and press “Load into compiler…”
  6. Wait, time depends on the pixels in file
  7. When loaded - make a CPU on the ground/constraption
  8. Put Expression2 named “image_convreter.txt”
  9. Put Digital Screen, in parameters - write size of your image
  10. Link - input E2 Scr -> Digital Screen (Create Wirelink); input E2 CPU -> Chip - CPU, input E2 Draw -> toggled button.
  11. Press the button and wait when picture draw :slight_smile:

Thanks to
Atom - for CPU and E2 example code.
Jinto - gm_image, used in this converter.

http://www.garrysmod.org/img/?t=dll&id=100814

PS: I see many times converter for Digital Screen, but never see in-game converter, I don’t visit wiremod.com, may be they make anything like this.

PSS: I use gm_image, so garrysmod.org say that this is unsafe addon, if you think so - http://www.facepunch.com/showthread.php?t=730661 , you can read the source of gm_image.

PSSS: I speak english not well, sorry for grammatical mistakes.

Quite a nice use of the gm_image module, not bad.

Interesting.

Also, pick up a new computer. I dumped my Pentium 4 at Christmas and I haven’t looked back :slight_smile:

Put this in wiremod forums