Overview
| Artifact ID: | 8eb39d61b2490c4abddcec6a846c9b864db5247f |
|---|---|
| Ticket: | e4336bef5d58cc96a438ba0fb5553ea57e94f4d8 |
| Date: | 2017-02-17 17:03:57 |
| User: | anonymous |
| Artifact Attached: | 0c879efab429a9c4e8c9842057c6a3b6c0508cc4 |
| Filename: | fix.patch |
| Description: | Here comes a proposed fix for the problem. What causes this bug is that both Tk_PhotoPutBlock() and Tk_PhotoPutZoomedBlock() do not really handle the case where source and destination are the same image. The patch solves this by creating a local copy of the source image data before it is copied to the destination image. This is done only if source and destination are the same image. Impact on performance: in the "normal" case - source and destination are different images - there's no noticeable impact. When copying to the same image, however, execution time can increase by over 50% for large images. I guess that's the price of a correct result! The patch also includes a few tests to make sure this doesn't happen again. |
Content:
(file is 14936 bytes of binary data)
