Skip to content

Instantly share code, notes, and snippets.

View janisozaur's full-sized avatar

Michał Janiszewski janisozaur

  • Poland
  • 13:09 (UTC +02:00)
View GitHub Profile
void Image::changeBrighten(int value)
{
// DOPISAĆ FUNKCJĘ która będzie przechowywać oryginalne parametry obrazka!!
QRgb pixel;
//na początek obsługa obrazków w skali szarości i mono (mniej niż 8 bitów)
if(QImage::Format_RGB32 > img->format())
{
QVector<QRgb> colorTab = img->colorTable();
for(int i = 0; i < colorTab.count(); i++)
@janisozaur
janisozaur / generator.cpp
Created March 27, 2011 16:32
generator.cpp
#include <stdlib.h>
#include <vector>
#include <string.h>
#include <stack>
#include <stdio.h>
#include <queue>
#include <time.h>
int *start;
int sx;
obraz = new QGridLayout();
QImage *img = new QImage();
img->load(fName);
if( img->load(fName)) qDebug()<<"Udalo sie zaladowac obrazek.";
//img->scaled(imgSize,Qt::IgnoreAspectRatio, Qt::FastTransformation);
//img->scaledToHeight(imgSize.height(), Qt::FastTransformation);
//img->scaledToWidth(imgSize.width(), Qt::FastTransformation);
QLabel *l = new QLabel;
obraz = new QGridLayout();
QImage *img = new QImage();
img->load(fName);
if( img->load(fName)) qDebug()<<"Udalo sie zaladowac obrazek.";
//img->scaled(imgSize,Qt::IgnoreAspectRatio, Qt::FastTransformation);
//img->scaledToHeight(imgSize.height(), Qt::FastTransformation);
//img->scaledToWidth(imgSize.width(), Qt::FastTransformation);
QLabel *l = new QLabel;
obraz = new QGridLayout();
QImage *img = new QImage();
img->load(fName);
if( img->load(fName)) qDebug()<<"Udalo sie zaladowac obrazek.";
//img->scaled(imgSize,Qt::IgnoreAspectRatio, Qt::FastTransformation);
//img->scaledToHeight(imgSize.height(), Qt::FastTransformation);
//img->scaledToWidth(imgSize.width(), Qt::FastTransformation);
QLabel *l = new QLabel;
xRot = 360 * asin((mRightFrontPos.y() - mRightZeroPos.y()) / (rightFrontX - mRightZeroPos).length()) * M_1_PI / 2;