From 37c93f10124663b639d255e172a66e0d989dd97c Mon Sep 17 00:00:00 2001 From: Gabriel Yancy Date: Mon, 11 Aug 2025 16:14:19 -0400 Subject: [PATCH 1/2] This involves a small change to the plotting code which no longer works with newer versions of Matlab. This now works with Matlab >= 2023. Back-compatibility is unclear. --- textureSynthesis.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/textureSynthesis.m b/textureSynthesis.m index 378fbfe..e6de718 100644 --- a/textureSynthesis.m +++ b/textureSynthesis.m @@ -117,14 +117,14 @@ end end -imf = max(1,gcf-1); snrf = imf+1; +imf = max(1,get(gcf,'Number')-1); snrf = imf+1; figure(imf); clf subplot(1,2,1); grayRange = showIm(im,'auto',1); title('Starting image'); drawnow prev_im=im; -imf = max(1,gcf-1); +imf = max(1,get(gcf, 'Number')-1); figure(imf); clf;showIm(im,'auto',1); title(sprintf('iteration 0')); From 0e02cd6d16b08596c568403b9271d9144f22d2c7 Mon Sep 17 00:00:00 2001 From: "William F. Broderick" Date: Tue, 12 Aug 2025 14:41:03 -0400 Subject: [PATCH 2/2] moves Gabe's message into readme --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 4361648..c03843b 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,13 @@ Comments/Suggestions/Bugs to: > for more details). The results of texture synthesis are still qualitatively > similar. +> [!WARNING] +> +> In https://github.com/LabForComputationalVision/textureSynth/pull/5, a small +> change was made to the plotting code for compatibility with recent versions +> of matlab. The code now works with Matlab >= 2023. Back-compatibility is +> unclear. + ## INSTALLATION 1) download and unpack the code. You can put the code anywhere on your