Author Topic: get image type...  (Read 1897 times)

0 Members and 1 Guest are viewing this topic.

Andrea

  • Water Moccasin
  • Posts: 2372
get image type...
« on: January 30, 2007, 03:02:50 PM »
Hi all..

i'm looking a way to get what type of image i have in my drawing..

Code: [Select]
(ssget "X" '((0 . "IMAGE")))
need to know if is a TIF JPG BMP ECW or other..

thanks..
Keep smile...

T.Willey

  • Needs a day job
  • Posts: 5251
Re: get image type...
« Reply #1 on: January 30, 2007, 03:08:06 PM »
Once you have your selection set, step through it and use this to get the extention.
Code: [Select]
(vl-filename-extension
 (vla-get-ImageFile
  (vlax-ename->vla-object Ent)
 )
)
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

Andrea

  • Water Moccasin
  • Posts: 2372
Re: get image type...
« Reply #2 on: January 30, 2007, 03:15:23 PM »
 :-)

Thank you Mr. T.
Keep smile...

T.Willey

  • Needs a day job
  • Posts: 5251
Re: get image type...
« Reply #3 on: January 30, 2007, 03:19:28 PM »
:-)

Thank you Mr. T.
You're welcome, but Mr. T is Mark, not me.  :-D Don't want to confuse people. :ugly:
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

ronjonp

  • Needs a day job
  • Posts: 7529
Re: get image type...
« Reply #4 on: January 30, 2007, 03:49:45 PM »
Another way:

Code: [Select]
(vlax-map-collection
  (vla-get-filedependencies
    (vla-get-activedocument
      (vlax-get-acad-object)
    )
  )
  '(lambda (x)
     (if (= (vla-get-feature x) "Acad:Image")
       (setq lst (append lst (list (vla-get-fullfilename x)))
     )
   )
)

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC