Message Boards Message Boards

0
|
4315 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

How to combine 2 graphics into 1 image?

Posted 10 years ago

It has to be easier than using Import / Export:

(*Head[gaxes] Head[gbig] are graphics*)

Export["C:UsersÀ0Desktopgaxes.gif", gaxes, "GIF"];
ga = Import["C:UsersÀ0Desktopgaxes.gif"];
Export["C:UsersÀ0Desktopgbig.gif", gbig, "GIF"];
gb = Import["C:UsersÀ0Desktopgbig.gif"];
blck = ImageCompose[ColorNegate[ga], ColorNegate[ImageCrop[gb]]]
wht = ColorNegate[blck]

(*Head[ga] Head[gb] are images*)

THE IMAGE STILL HAS MUTATIONS - DO NOT USE!

Attachments:
POSTED BY: Douglas Youvan
2 Replies

Could you explain more what is exactly the issue? Also if you would like folks to figure this out, perhaps you can attach the 2 original images to compose or a notebook with them?

POSTED BY: Sam Carrettie

I assume you're asking because you're performing actions before the compose that automatically rasterize the graphics without transparency so you can't just do ImageCompose[gaxes, gbig].

Try this:

blck = ImageCompose[ColorNegate[Rasterize[gaxes, Background -> None]],
   ColorNegate[ImageCrop[Rasterize[gbig, Background -> None]]]]

Also, you don't need to specify the GIF file format when exporting, since it's already in the file name.

Apologies if I'm not interpreting your question correctly.

POSTED BY: Jesse Friedman
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract