fixed unncessary calls
This commit is contained in:
@@ -10,6 +10,6 @@ unsigned int*
|
|||||||
ppm_flip_v(const unsigned int* buf, const PPM img);
|
ppm_flip_v(const unsigned int* buf, const PPM img);
|
||||||
|
|
||||||
unsigned int*
|
unsigned int*
|
||||||
u32_rotate(const unsigned int* buf, PPM* m_img, const int len);
|
u32_rotate(const unsigned int* buf, PPM* m_img);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#include <stdlib.h>
|
|
||||||
#include "image/transformations.h"
|
#include "image/transformations.h"
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
unsigned int*
|
unsigned int*
|
||||||
ppm_flip_h(const unsigned int* buf, const PPM img)
|
ppm_flip_h(const unsigned int* buf, const PPM img)
|
||||||
{
|
{
|
||||||
@@ -45,9 +46,9 @@ ppm_flip_v(const unsigned int* buf, const PPM img)
|
|||||||
}
|
}
|
||||||
|
|
||||||
unsigned int*
|
unsigned int*
|
||||||
u32_rotate(const unsigned int* buf, PPM* m_img, const int len)
|
u32_rotate(const unsigned int* buf, PPM* m_img)
|
||||||
{
|
{
|
||||||
unsigned int* mask = malloc(len * sizeof(unsigned int));
|
unsigned int* mask = malloc(m_img->len * sizeof(unsigned int));
|
||||||
int old_width = m_img->width;
|
int old_width = m_img->width;
|
||||||
int old_height = m_img->height;
|
int old_height = m_img->height;
|
||||||
for (int row = 0; row < old_height; row++)
|
for (int row = 0; row < old_height; row++)
|
||||||
|
|||||||
Reference in New Issue
Block a user