Attachment "tkImgPhoto.c.diff" to
ticket [03fcf233]
added by
jal_frezie
2026-04-03 11:17:44.
651c651
< width = options.fromX2 - options.fromX;
---
> width = (options.fromX2 - options.fromX) * options.zoomX;
659c659
< options.toX2 = options.toX + width * options.zoomX;
---
> options.toX2 = options.toX + width;
661c661
< height = options.fromY2 - options.fromY;
---
> height = (options.fromY2 - options.fromY) * options.zoomY;
671c671
< options.toY2 = options.toY + height * options.zoomY;
---
> options.toY2 = options.toY + height;
3509c3509
< int pitch, xRepeat, yRepeat, blockXSkip, blockYSkip, sourceIsSimplePhoto;
---
> int pitch, blockXSkip, blockYSkip, sourceIsSimplePhoto;
3633,3634c3633,3634
< blockXSkip = subsampleX * sourceBlock.pixelSize;
< blockYSkip = subsampleY * sourceBlock.pitch;
---
> blockXSkip = sourceBlock.pixelSize;
> blockYSkip = sourceBlock.pitch;
3636c3636
< blockWid = ((sourceBlock.width + subsampleX - 1) / subsampleX) * zoomX;
---
> blockWid = (sourceBlock.width * zoomX + subsampleX - 1) / subsampleX;
3640c3640
< blockWid = ((sourceBlock.width - subsampleX - 1) / -subsampleX) * zoomX;
---
> blockWid = (sourceBlock.width * zoomX - subsampleX - 1) / -subsampleX;
3643c3643
< blockHt = ((sourceBlock.height + subsampleY - 1) / subsampleY) * zoomY;
---
> blockHt = (sourceBlock.height * zoomY + subsampleY - 1) / subsampleY;
3647c3647
< blockHt = ((sourceBlock.height - subsampleY - 1) / -subsampleY) * zoomY;
---
> blockHt = (sourceBlock.height * zoomY - subsampleY - 1) / -subsampleY;
3667c3667
< yRepeat = zoomY;
---
> int yProgress = 0;
3675,3676c3675,3676
< for (; wCopy > 0; wCopy -= zoomX) {
< for (xRepeat = MIN(wCopy, zoomX); xRepeat > 0; xRepeat--) {
---
> int xProgress = 0;
> for (; wCopy > 0; wCopy--) {
3688,3691c3688
< continue;
< }
<
< if (compRule==TK_PHOTO_COMPOSITE_SET || !destPtr[3]) {
---
> } else if (compRule==TK_PHOTO_COMPOSITE_SET || !destPtr[3]) {
3719,3721c3716
< }
< srcPtr += blockXSkip;
< }
---
> srcPtr = srcLinePtr + (((++xProgress)*subsampleX)/zoomX)*blockXSkip; }
3724,3728c3719
< yRepeat--;
< if (yRepeat <= 0) {
< srcLinePtr += blockYSkip;
< yRepeat = zoomY;
< }
---
> srcLinePtr = srcOrigPtr + (((++yProgress)*subsampleY)/zoomY)*blockYSkip;