mirror of
https://github.com/andre-wojtowicz/image-processing-project-student.git
synced 2025-03-25 19:17:12 +01:00
33 lines
610 B
C++
33 lines
610 B
C++
#include "conversion_grayscale.h"
|
|
|
|
ConversionGrayscale::ConversionGrayscale(PNM* img) :
|
|
Transformation(img)
|
|
{
|
|
}
|
|
|
|
ConversionGrayscale::ConversionGrayscale(PNM* img, ImageViewer* iv) :
|
|
Transformation(img, iv)
|
|
{
|
|
}
|
|
|
|
PNM* ConversionGrayscale::transform()
|
|
{
|
|
qDebug() << Q_FUNC_INFO << "Not implemented yet!";
|
|
|
|
int width = image->width();
|
|
int height = image->height();
|
|
|
|
PNM* newImage = new PNM(width, height, QImage::Format_Grayscale8);
|
|
|
|
if (image->format() == QImage::Format_Mono)
|
|
{
|
|
|
|
}
|
|
else // if (image->format() == QImage::Format_RGB32)
|
|
{
|
|
|
|
}
|
|
|
|
return newImage;
|
|
}
|