Tk Source Code

View Ticket
Login
Ticket UUID: e4336bef5d58cc96a438ba0fb5553ea57e94f4d8
Title: Unexpected result when copying a photo image to itself
Type: Bug Version: 8.6.6
Submitter: anonymous Created on: 2017-02-17 13:32:17
Subsystem: 41. Photo Images Assigned To: simonbachmann
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2020-05-16 13:01:46
Resolution: Fixed Closed By: fvogel
    Closed on: 2020-05-16 13:01:46
Description:
The 'copy' command of photo images does not handle correctly the case where source and destination are the same image. 
The problem can be reproduced with this simple script:

image create photo testImg -file $someImage
label .l -image testImg
grid .l
testImg copy testImg -to 10 10

While the result might be quite decorative, it most certainly is not what one would expect :-)

What happens is that, after the first 10 pixels, the copy command uses the just copied pixels as input, instead of the contents of the original image.
User Comments: fvogel added on 2020-05-16 13:01:46:

For the records, there was a mistake in the committed patch, see [5c51be641].


jan.nijtmans added on 2017-05-01 10:15:30:
Merged to core-8-6-branch and trunk. Many thanks, Simon!

fvogel added on 2017-04-30 12:07:54:
Looks nice, great!

simonbachmann added on 2017-04-30 09:19:44:

The attached patch is in [11192077] now.

Compiles without error on linux and windows.

Passes all tests that match the "-file img*.test" pattern.


Attachments: