TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: squirreldip on November 21, 2017, 12:08:46 PM

Title: Inserting Image
Post by: squirreldip on November 21, 2017, 12:08:46 PM
Back in the 'old' days when you imported an image in came in as a block with coloured 2d solids.  Is it possible to import using this method with current versions?  If not, is anyone aware of a utility to do so?
Title: Re: Inserting Image
Post by: ronjonp on November 21, 2017, 12:24:24 PM
Adobe Illustrator can export images to DWG.
Title: Re: Inserting Image
Post by: squirreldip on November 21, 2017, 12:50:00 PM
I don't have access to Illustrator...  I'm trying to write a routine that will read the 'pixels'

Another option (which is likely a better idea) is to use Visual Studio and write the data I want to a file.
Title: Re: Inserting Image
Post by: d2010 on November 21, 2017, 06:18:19 PM
You found one solution
  http://lisp2arx.3xforum.ro (http://lisp2arx.3xforum.ro)
Edit by Admin Are you fishing?
Title: Re: Inserting Image
Post by: roy_043 on November 22, 2017, 10:19:13 AM
If you save the image as a .bmp file with a color depth of 256 (8 bits), then every pixel will be represented by 1 byte in the file. The first part of the file defines the X and Y size of the image, the palette etc. then all 'pixel bytes' follow in sequence.

For images with a limited palette this is doable:
Title: Re: Inserting Image
Post by: squirreldip on November 27, 2017, 12:56:21 PM
Thanks for the comments!

I think I found the simplest solution and it was to use Visual Studio Community - fairly easy to work with graphics file and I can output text in whatever structure I want to.