Jump to content

Stretch jpeg image


satishrajdev

Recommended Posts

Dear all

i want to stretch jpeg image to the different particular points in normal autocad, just like Autocad Map 3D having rubbersheet option for that,

 

Anybody knows any tool or lisp or application that could help me out

 

reply as soon as possible

Link to comment
Share on other sites

You can achieve that by converting the image into a block (BLOCK command) and adjusting independently the scale factors on X, respectively Y axis. May exploded the block just after, the image will retain the new ratio (don't forget to purge the said block in this case).

Or may adjust the original image in an image editor and re-insert it (if not attached).

Link to comment
Share on other sites

Thank you guys for showing interest

I can do that by blocking the image but it will take little time for scaling and rotating, that's why I want such tool that can do that automatically

Link to comment
Share on other sites

Something like this?

;;; Scale Image with Different Factors (19-IV-2012)
(defun c:SIDF( / oldCMD imageItem scaleX scaleY assocImage insPoint )
(setq oldCMD (getvar "CMDECHO"))(setvar "CMDECHO" 0)
(if (and (setq imageItem (ssget "_:S:E" '((0 . "IMAGE"))))
         (setq scaleX    (getreal "\nScale on X: "))
         (setq scaleY    (getreal "\nScale on Y: ")))
 (progn
  (setq assocImage (entget (ssname imageItem 0))
        insPoint   (cdr (assoc 10 assocImage)))

  (command "_BLOCK" "TEMP1234567" insPoint (ssname imageItem 0) "")
  (command "_INSERT" "TEMP1234567" "_non" insPoint scaleX scaleY 0.0)
  (command "_PURGE" "_B" "TEMP1234567" "_N")
 )
)
(setvar "CMDECHO" oldCMD)
(progn)
)

Please note that doesn't work with pasted imaged, only with attached ones.

Link to comment
Share on other sites

I'm not aware of anything that does what you want but as a work around you make 2 blocks, one being the jpeg and another being a simple block with reference points only that matches your jpeg, you can then manipulate the second block to where you want it then use 'blockreplace' to swap the block to the jpeg block it will take the same characteristics. Make sure that both blocks have the same insertion point. It will save the long delays in trying to manipulate a block with a jpeg in it.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...