Skip to main content

Thread: Scaling, how it should be done with Java.


if have int[], int[] holds pixels of bufferedimage, kind of math , calculations need learn make int[] bytes scalable.

want grap pixels bimage int[] , scale bimage on byte level.

java question, dont want use awt want make own scale routines images, is, because want use cpu not gpu time project.

im building boardgames java , dont want use gpu cpu.

quote posted jaho22 view post
if have int[], int[] holds pixels of bufferedimage, kind of math , calculations need learn make int[] bytes scalable.

want grap pixels bimage int[] , scale bimage on byte level.

java question, dont want use awt want make own scale routines images, is, because want use cpu not gpu time project.

im building boardgames java , dont want use gpu cpu.
there affinetransform class that: http://www.javalobby.org/java/forums/t19387.html

problem if use on plain numbers gives plain numbers... , on images want bit more this, want intelligent interpolation. provided java. have old code (dates java 1.2) this:
code:
   graphics2d g2;      g2.setrenderinghint(renderinghints.key_antialiasing,renderinghints.value_antialias_on);     g2.setrenderinghint(renderinghints.key_rendering,renderinghints.value_render_quality);     g2.setrenderinghint(renderinghints.key_dithering,renderinghints.value_dither_enable);   g2.setrenderinghint(renderinghints.key_interpolation,renderinghints.value_interpolation_bicubic);      affinetransform at;     if (zoomratio==100) at=new affinetransform(); //identity transform     else at=affinetransform.getscaleinstance(zoomratio/100.,zoomratio/100.);          affinetransformop ato=new affinetransformop(at,affinetransformop.type_nearest_neighbor);          g2.drawimage(finalimage,ato,x,y);
but produces image screen. getting result image left exercise reader...


Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk Scaling, how it should be done with Java.


Ubuntu

Comments

Popular posts from this blog

How to set the order of FAQs instead of alphabetical

Thread: Get UK Keyboard working

how do I change the e-mail address for my merchant account