Gimp-Forum.net
ofn3-layer-tiles - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: Extending the GIMP (https://www.gimp-forum.net/Forum-Extending-the-GIMP)
+--- Thread: ofn3-layer-tiles (/Thread-ofn3-layer-tiles)

Pages: 1 2


RE: ofn3-layer-tiles - Ofnuts - 06-10-2025

Oops. Packaging error.  Angel Re-uploaded a fixed package.


RE: ofn3-layer-tiles - Phoenix - 06-13-2026

Hi, I have a bug report to make.

In the code used to split by width and height, there's a bug that results in an image that is 32x704 being split by 32x32 producing 1024 (32^2) layers rather than 22 layers.

This is using the plugin with a modified date of 2025-06-10 (the latest).

Removing the line of code and testing without it results in it correctly splitting the image.

Code:
def layerToTilesWH(procedure: Gimp.ImageProcedure,
               run_mode: Gimp.RunMode,
               image: Gimp.Image,
               drawables: list[Gimp.Drawable],
               config: Gimp.ProcedureConfig, data: Any):
    trace(f'fullDialog({procedure=!r}, {run_mode=!r}, {image=!r}, {drawables=!r}, {config=!r}, {data=!r})')

    width,height=getArgsValues(config,widthArg, heightArg)
    pattern,rowsFirst,disposition=getArgsValues(config,patternArg,rcOrderSplitArg,dispositionSplitArg)
    trace(f'{width=}, {height=}, {pattern=}, {rowsFirst=}, {disposition=}')
    layer=drawables[0]
    layerToTiles(image,layer,pattern,tilesDataRC(layer,width,height),disposition,rowsFirst) #incorrect code?

    layerToTiles(image,layer,pattern,tilesDataWH(layer,width,height),rowsFirst,disposition)