Image manipulation throwing "Unable to render RenderedOp for this operation"

1,189 views
Skip to first unread message

Brad Wood

unread,
Aug 27, 2014, 6:39:18 PM8/27/14
to ra...@googlegroups.com
I've tried to use imageResize() or ImageScaleToFit() on a handful of JPG, PNG, or BMP image files and every time I receive the error "Unable to render RenderedOp for this operation."   A bit of Googling showed that Google is full of Java forums talking about this error, but the first 10 or 15 I read didn't seem to have any substantial answers.  Am I missing some configuration for this to work?  I can attach one of the images producing the error, but since every image I'd tried so far errored, it seemed to be unrelated to any single file.

Also, for what it's worth, isImageFile() returns true on all these images.

Railo: 4.2.1.000
Windows 7

Thanks!

~Brad

- Unable to render RenderedOp for this operation.
	at javax.media.jai.RenderedOp.createInstance(RenderedOp.java:838):838
	at javax.media.jai.RenderedOp.createRendering(RenderedOp.java:878):878
	at javax.media.jai.RenderedOp.getColorModel(RenderedOp.java:2253):2253
	at javax.media.jai.PlanarImage.getAsBufferedImage(PlanarImage.java:2511):2511
	at javax.media.jai.PlanarImage.getAsBufferedImage(PlanarImage.java:2559):2559
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method):-2
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57):57
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43):43
	at java.lang.reflect.Method.invoke(Method.java:601):601
	at railo.runtime.img.JAIUtil.getAsBufferedImage(JAIUtil.java:136):136
	at railo.runtime.img.JAIUtil.read(JAIUtil.java:78):78
	at railo.runtime.img.coder.JRECoder.toBufferedImage(JRECoder.java:86):86
	at railo.runtime.img.coder.DoubleCoder.toBufferedImage(DoubleCoder.java:37):37
	at railo.runtime.img.ImageUtil.toBufferedImage(ImageUtil.java:53):53
	at railo.runtime.img.Image.(Image.java:230):230
	at railo.runtime.img.Image.(Image.java:214):214
	at railo.runtime.img.Image.toImage(Image.java:1386):1386
	at railo.runtime.img.Image.toImage(Image.java:1362):1362
	at railo.runtime.functions.image.ImageScaleToFit.call(ImageScaleToFit.java:19):19
	at railo.runtime.functions.image.ImageScaleToFit.call(ImageScaleToFit.java:10):10
	at views.main.index_cfm$cf.call(//views/main/index.cfm:1):1

Andrew Dixon

unread,
Aug 27, 2014, 6:46:48 PM8/27/14
to ra...@googlegroups.com
What JVM are you running on Brad? Vendor and version number.

Kind regards,

Andrew


--
Did you find this reply useful? Help the Railo community and add it to the Railo Server wiki at https://github.com/getrailo/railo/wiki
---
You received this message because you are subscribed to the Google Groups "Railo" group.
To view this discussion on the web visit https://groups.google.com/d/msgid/railo/0e1cb443-3f5b-4183-be66-539a0b5a4537%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Brad Wood

unread,
Aug 27, 2014, 6:49:13 PM8/27/14
to ra...@googlegroups.com
1.7.0_21 (Oracle Corporation)

I'll also add I've tried the code in Railo running inside of Tomcat 7 as well as inside CommandBox which is outside a servlet container.  Same version of Railo and Java in both instances.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp 

ColdBox Platform: http://www.coldbox.org 



You received this message because you are subscribed to a topic in the Google Groups "Railo" group.
To view this discussion on the web visit https://groups.google.com/d/msgid/railo/CAG1WijV9juEB0Vk-XtsVDpNR8ashVmax8gKV0nBm2m%2B6yPeqxg%40mail.gmail.com.

Brad Wood

unread,
Aug 27, 2014, 7:10:04 PM8/27/14
to ra...@googlegroups.com
I believe I have solved this.  I had misread the docs and thought the "name" attribute was to be a string representing the file system path to the image.  The Railo docs just say, "The image on which this operation is performed." which is a bit vague.

After consulting the Adobe docs (which includes code samples) I realized I needed to use imageNew() to create an image object and pass that in.  

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp 

ColdBox Platform: http://www.coldbox.org 



Brad Wood

unread,
Aug 27, 2014, 7:24:27 PM8/27/14
to ra...@googlegroups.com
And with that, a new CommandBox command is born: imageTOASCII!  Coming to a ForgeBox near you.

CommandBox> imageTOASCII C:/commandbox-185-logo.png

 *8888888888888888888888888888888888888888888888*
 +@@@@@@@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@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+
 *8888888888888888888888888888888888888888888888*

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp 

ColdBox Platform: http://www.coldbox.org 



Andrew Dixon

unread,
Aug 28, 2014, 5:48:19 AM8/28/14
to ra...@googlegroups.com
Nice... not sure I have a use case for it, but nice...

Kind regards,

Andrew


Adrian Lynch

unread,
Aug 28, 2014, 6:17:44 AM8/28/14
to ra...@googlegroups.com
Try thinking outside the CommandBox!

:D


Chris Blackwell

unread,
Aug 28, 2014, 8:06:54 AM8/28/14
to railo

How about for making capture tests?

Andrew Dixon

unread,
Aug 28, 2014, 9:50:52 AM8/28/14
to ra...@googlegroups.com
And what do you think Brad's original photo was? A fish? The starship Enterprise? something else? I've seen some difficult CAPTCHA's but that would take the biscuit... :-)

Kind regards,

Andrew


Brad Wood

unread,
Aug 28, 2014, 10:20:02 AM8/28/14
to ra...@googlegroups.com

On Thu, Aug 28, 2014 at 8:50 AM, Andrew Dixon <andrew...@gmail.com> wrote:
Kind regards,

Lol, it was the CommandBox logo.  I'm sure everyone who's downloaded the CLI recognized it :)

How about this one-- is it easier to recognize?  And yes, I added color support!

Inline image 1

Robert Zehnder

unread,
Aug 29, 2014, 9:21:11 AM8/29/14
to ra...@googlegroups.com
lol That is awesome
Reply all
Reply to author
Forward
0 new messages