0

Okay hi!

So everything looks good, it's able to resize horizontally & vertically. For instance, when i set n as 4, the 3x3 pixel will be enlarged to

enter image description here

However, when i set n to (2 or 3), the pixels become a little weird..

when N = 2,

enter image description here

the hex values when n=2 are shown below. It's a little weird as u can see the padding that was calculated were 2bytes (0x00, 0x00). By right, it should be 3 bytes (0x00, 0x00, 0x00). I really have to clue where i went wrong.

enter image description here

I even went to print the output of the NEW padding and it's 2 bytes.

Here's my code: https://pastebin.com/PAz17HuQ

Thank you so much for helping.

0

When I ran your code, it works fine. (Please delete your code when this is resolved.)

Are you sure that you have recompiled the code after changing it, and are you sure that you're compiling and running the same version of the code that you changed?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .