| Summary: | embedded konqueror viewer when saving image redownloads the image instead of copying temporary file | ||
|---|---|---|---|
| Product: | [Applications] gwenview | Reporter: | Michael Pyne <mpyne> |
| Component: | general | Assignee: | Gwenview Bugs <gwenview-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | minor | ||
| Priority: | NOR | ||
| Version First Reported In: | 2.1 | ||
| Target Milestone: | --- | ||
| Platform: | Compiled Sources | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Michael Pyne
2008-05-16 00:39:53 UTC
I'd make up a patch for it but: The only code that knows what the file name would be seems to be LoadingDocumentImpl (which doesn't have it saved to a file but to a QByteArray mData). Once the file is loaded, it switches to a different implementation and deletes itself. Now all we have is a QImage which trying to re-save could lose quality. Not sure how you want to do it but you'd need to save that QByteArray in between somehow. You are right, the original is lost when LoadingDocumentImpl deletes itself, except in the case of JPEG files, because we need the raw data to perform lossless transformations. Maybe we could keep the data for all image types when viewing a remote url. In this case LoadingDocumentImpl should pass the raw data to DocumentLoadedImpl just like it does with JpegDocumentLoadedImpl. Keeping the image data is what I would recommend. The alternative is saving it to a temp file and then deleting it on close but that will likely lead to having files cluttering the temp dir after time. SVN commit 813314 by gateau: Keep raw data for remote urls if we are not embedded in Gwenview. BUG: 162141 M +6 -0 gvpart.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=813314 |