so I wrote this small piece of function which is supposed to scale image to width of 800 (height can be anything).
However - when I divide integer (800) by bigger Integer (1080 for example), the result comes out as 0.
What causes this?
double ratio = 800 / bit.getWidth();
double newHeight = ratio * bit.getHeight();
double newWidth = ratio * bit.getWidth();
Log.d("New Values:", String.valueOf(newHeight) + "/ " + String.valueOf(newWidth));
scaleBitmap(bit, (int)newHeight, (int)newWidth);
I mean the double called ratio comes out as 0.