G
Guest
Gast
Moin
Warum geht das:
aber das nicht:
Beim zweiten Fall bekomme ich das Bild nur in Orginalgrösse, laut eclipse ist die destwith / destheight = den Werten der source.
Was mach ich da falsch, weiss das wer?
Warum geht das:
Code:
public void setScaling(int s){
scaling=s;
int e1=(int)(image_n.getWidth() * (s*0.01));
int e2=(int)(image_n.getHeight() * (s*0.01));
scaledimage_n = image_n.getScaledInstance(10, 10, Image.SCALE_SMOOTH);
//scaledimage_n = image_n.getScaledInstance(e1, e2, Image.SCALE_SMOOTH);
}
Code:
public void setScaling(int s){
scaling=s;
int e1=(int)(image_n.getWidth() * (s*0.01));
int e2=(int)(image_n.getHeight() * (s*0.01));
//scaledimage_n = image_n.getScaledInstance(10, 10, Image.SCALE_SMOOTH);
scaledimage_n = image_n.getScaledInstance(e1, e2, Image.SCALE_SMOOTH);
}
Was mach ich da falsch, weiss das wer?