Changeset View
Changeset View
Standalone View
Standalone View
source/blender/freestyle/intern/stroke/Canvas.cpp
| Show First 20 Lines • Show All 347 Lines • ▼ Show 20 Lines | #if 0 // soc | ||||
| QImage newMap(filePath.c_str()); | QImage newMap(filePath.c_str()); | ||||
| if (newMap.isNull()) { | if (newMap.isNull()) { | ||||
| cerr << "Could not load image file " << filePath << endl; | cerr << "Could not load image file " << filePath << endl; | ||||
| return; | return; | ||||
| } | } | ||||
| qimg = &newMap; | qimg = &newMap; | ||||
| #endif | #endif | ||||
| /* OCIO_TODO: support different input color space */ | /* OCIO_TODO: support different input color space */ | ||||
| ImBuf *qimg = IMB_loadiffname(filePath.c_str(), 0, NULL); | ImBuf *qimg = IMB_loadiffname(filePath.c_str(), static_cast<eImBufFlags>(0), NULL); | ||||
| if (qimg == 0) { | if (qimg == 0) { | ||||
| cerr << "Could not load image file " << filePath << endl; | cerr << "Could not load image file " << filePath << endl; | ||||
| return; | return; | ||||
| } | } | ||||
| #if 0 // soc | #if 0 // soc | ||||
| // resize | // resize | ||||
| QImage scaledImg; | QImage scaledImg; | ||||
| ▲ Show 20 Lines • Show All 75 Lines • ▼ Show 20 Lines | for (y = 0; y < oh; ++y) { | ||||
| pix[0] = pix[1] = pix[2] = c; | pix[0] = pix[1] = pix[2] = c; | ||||
| } | } | ||||
| } | } | ||||
| // soc qtmp.save(base + QString::number(i) + ".bmp", "BMP"); | // soc qtmp.save(base + QString::number(i) + ".bmp", "BMP"); | ||||
| stringstream filename; | stringstream filename; | ||||
| filename << base; | filename << base; | ||||
| filename << i << ".bmp"; | filename << i << ".bmp"; | ||||
| qtmp->ftype = IMB_FTYPE_BMP; | qtmp->ftype = IMB_FTYPE_BMP; | ||||
| IMB_saveiff(qtmp, const_cast<char *>(filename.str().c_str()), 0); | IMB_saveiff(qtmp, const_cast<char *>(filename.str().c_str()), static_cast<eImBufFlags>(0)); | ||||
| } | } | ||||
| #if 0 | #if 0 | ||||
| QImage *qtmp = new QImage(w, h, 32); | QImage *qtmp = new QImage(w, h, 32); | ||||
| for (y = 0; y < h; ++y) { | for (y = 0; y < h; ++y) { | ||||
| for (x = 0; x < w; ++x) { | for (x = 0; x < w; ++x) { | ||||
| int c = (int)blur.pixel(x, y); | int c = (int)blur.pixel(x, y); | ||||
| qtmp->setPixel(x, y, qRgb(c, c, c)); | qtmp->setPixel(x, y, qRgb(c, c, c)); | ||||
| Show All 34 Lines | |||||