I create three random images:

i1 = Image[RandomReal[1, {8, 12, 3}]];
i2 = Image[RandomReal[1, {8, 12, 3}]];
i3 = Image[RandomReal[1, {8, 12, 3}]];

I can scale a single image with

ImageResize[i1, Scaled[50]]

How can I map ImageScaled to all of them

ImageResize /@ {i1, i2, i3}

using the Scaled[50] argument?



ImageResize[#, Scaled[50]]& /@ {i1, i2, i3}
  • $\begingroup$ Thanks for answer, but there is no closing parenthesis, even if I add the parenthesis it only prints ImageScaled[#1, {Scaled[50], Scaled[50], Scaled[50]}] $\endgroup$ – user2019001 Jan 8 '14 at 6:11
  • $\begingroup$ @user2019001. Thanks for pointing out my typo. Try the edited version. $\endgroup$ – m_goldberg Jan 8 '14 at 6:13
  • $\begingroup$ Thanks for editing, the answer you gave is correct but I put the wrong command, it should be ImageResize, however this worked, thanks. $\endgroup$ – user2019001 Jan 8 '14 at 6:20

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.