|
Hi,
how can it happen that the preview image inside the editor does not show the result of a filter? The code in putPreviewData() is a copy from the LevelsAdjust tool. The used filter itself seems to work, because after ending the tool the final image is correct. This is the code of putPreviewData() void FilmTool::putPreviewData() { DImg preview = filter()->getTargetImage(); d->previewWidget->setPreviewImage(preview); // Update histogram. if (d->destinationPreviewData) { delete [] d->destinationPreviewData; } d->destinationPreviewData = preview.copyBits(); d->gboxSettings->histogramBox()->histogram()->updateData(d- >destinationPreviewData, preview.width(), preview.height(), preview.sixteenBit(), 0, 0, 0, false); } Interestingly, the output histogram is also correct, just the preview window doesn't show the result correctly... br matthias _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
|
it's not a problem about preview mode ? Look on the tool preview icons
from the task bar in editor ? Gilles Caulier 2012/2/4 Matthias Welwarsky <[hidden email]>: > Hi, > > how can it happen that the preview image inside the editor does not show the > result of a filter? The code in putPreviewData() is a copy from the > LevelsAdjust tool. The used filter itself seems to work, because after ending > the tool the final image is correct. > > This is the code of putPreviewData() > > void FilmTool::putPreviewData() > { > DImg preview = filter()->getTargetImage(); > d->previewWidget->setPreviewImage(preview); > > // Update histogram. > > if (d->destinationPreviewData) > { > delete [] d->destinationPreviewData; > } > > d->destinationPreviewData = preview.copyBits(); > d->gboxSettings->histogramBox()->histogram()->updateData(d- >>destinationPreviewData, > preview.width(), preview.height(), preview.sixteenBit(), > 0, 0, 0, false); > } > > Interestingly, the output histogram is also correct, just the preview window > doesn't show the result correctly... > > br > matthias > _______________________________________________ > Digikam-devel mailing list > [hidden email] > https://mail.kde.org/mailman/listinfo/digikam-devel Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
|
On Saturday 04 February 2012 16:20:24 Gilles Caulier wrote:
> it's not a problem about preview mode ? Look on the tool preview icons > from the task bar in editor ? The preview mode is set to "Mouse Over" mode, but changing it to any other mode doesn't have an effect, either. > > Gilles Caulier > > 2012/2/4 Matthias Welwarsky <[hidden email]>: > > Hi, > > > > how can it happen that the preview image inside the editor does not show > > the result of a filter? The code in putPreviewData() is a copy from the > > LevelsAdjust tool. The used filter itself seems to work, because after > > ending the tool the final image is correct. > > > > This is the code of putPreviewData() > > > > void FilmTool::putPreviewData() > > { > > DImg preview = filter()->getTargetImage(); > > d->previewWidget->setPreviewImage(preview); > > > > // Update histogram. > > > > if (d->destinationPreviewData) > > { > > delete [] d->destinationPreviewData; > > } > > > > d->destinationPreviewData = preview.copyBits(); > > d->gboxSettings->histogramBox()->histogram()->updateData(d- > > > >>destinationPreviewData, > >> > > preview.width(), preview.height(), preview.sixteenBit(), > > 0, 0, 0, false); > > } > > > > Interestingly, the output histogram is also correct, just the preview > > window doesn't show the result correctly... > > > > br > > matthias > > _______________________________________________ > > Digikam-devel mailing list > > [hidden email] > > https://mail.kde.org/mailman/listinfo/digikam-devel > > _______________________________________________ > Digikam-devel mailing list > [hidden email] > https://mail.kde.org/mailman/listinfo/digikam-devel Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
|
On Saturday 04 February 2012 17:18:17 Matthias Welwarsky wrote:
> On Saturday 04 February 2012 16:20:24 Gilles Caulier wrote: > > it's not a problem about preview mode ? Look on the tool preview icons > > from the task bar in editor ? > > The preview mode is set to "Mouse Over" mode, but changing it to any other > mode doesn't have an effect, either. OK, understood the problem: The InvertFilter also inverts the Alpha channel ;) So, an opaque image becomes fully transparent after the filter has run and the preview widget paints nothing. And, because the viewport paint method unconditionally paints the original image first, this is what is eventually visible :) I'd say it's a bug in the InvertFilter code. Do you agree? It doesn't make sense to invert the alpha information. br matthias _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
| Free forum by Nabble | Edit this page |
