0

When I use the "direct selection tool" (not the regular selection tool) to select the image, this box randomly shows up around it... It is making the script I wrote freak out. Basically, what I need to do is resize the image to a specific dimension by inches (constrained as well), but this random box around it is not helping....

For some images, I can ungroup and group again, then run my script and it will work, but overall I need something that will work for every file. I need to be able to write this in a script, so please let me know how to do this manually... without creating a whole new file. I left the "layers" box open, so you can see how the image is (terribly) organized. The problem is EVERY image is going to be different...so I need to figure out a way to just nuke that box. I've tried deleting certain objects, I just don't understand what it is.enter image description here

enter image description here

  • Flatten Transparency. – Scott Oct 28 '15 at 16:41
  • i tried that as well. no luck. – Hudene Oct 28 '15 at 20:43
  • Well with raster images, there's always a bounding box for them which really can't be removed. – Scott Oct 28 '15 at 20:45
1

Your dancer image seems to be a JPG imported in Illustrator. Since you seem to want to use a script in Illustrator but work on raster with this software (by the way, Photoshop is easier for this), here's what you can do:

Why not simply crop it in Photoshop and place it again in Illustrator. This way you will still have that box but it will be the size of your artboard or at least smaller.

Additionally, you can also make that background transparent in Photoshop using a layer mask, applying it and then importing again that image in Illustrator. Don't import as a JPG though, there's no transparency with that file format.

You will always have that bounding box when you import a JPG or any raster in Illustrator, and even with a clipping mask it will be there (plus the clipping mask box). So maybe it's easier to simply get rid of the extra white parts of your JPG.

0

It's a clipping mask. You'll have to see if you can remove the clipping mask or find a way around it.

  • Try selecting the clipping mask (the invisible box) with the direct selection tool and deleting it. – ispaany Oct 28 '15 at 20:33
  • i tried that all of this already, no luck =( – Hudene Oct 28 '15 at 20:43
  • You may have to release it and find another way of doing whatever it is the mask is doing – AMontpetit Oct 28 '15 at 20:48
  • 2
    It's not a mask.. it's a placed raster image. – Scott Oct 28 '15 at 23:33
  • I have tried to ungroup and group the parts of the layers ... for the sun, it works fine when i'm resizing, but for the dancer, it just doesn't work – Hudene Oct 28 '15 at 23:41
0

I don't know of a good way to do this through the GUI, but you can open the SVG files in a text editor and just delete the <defs> sections.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.