• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 269
  • Last Modified:

Share Image instance with Native code

Hi,

I need to perform some high quality, image resizes (with the use of the Lanczos3 and sometimes the Mitchell algorithms). I have managed to achieve this with just Java (with the use of JIU (http://jiu.sourceforge.net/)).

However, it takes quite a few seconds (approx 10) to resize an image, at 100% CPU usage.

As a result of this lag, I thought that I could get the job done quicker and more efficiently, if I were to use some C++ to do the Image resize (with this algorithm) ... I know how to share String, int, etc, instances, but how to share Image instances with C++? I haven't come across a jimage type in the jni.h file yet; lol, I'm guessing it can't be done? :o\

Thanks,
Rob.
0
InteractiveMind
Asked:
InteractiveMind
  • 2
1 Solution
 
objectsCommented:
you'll need to encode it in some image format and pass using a byte array.
0
 
objectsCommented:
which may well hurt your performance, depending on where you are getting the source image from.
0
 
InteractiveMindAuthor Commented:
Thanks Mick,
this was the answer I was expecting (and fearing). lol. :o\ Ah well.

Regards;
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now