EDIT I reinstall Image Magic and do the following cript#!C:/Strawberry/perl/bin/perl.exe -w use warnings; use Image::Thumbnail; $imgdir= "C:/Users/41786/OneDrive/Documents/recordz1/upload"; my $t = new Image::Thumbnail( module => 'Imager', size => 55, create => 1, input => "$imgdir/282.jpg", outputpath => "$imgdir/test.jpg", );
Now I'm getting the following error : No module found with which to make a thumbnail at C:/xampp/perl/site/lib/Image/Thumbnail.pm line 304. So I ran cpan install Image::Magick and got the following exception#!C:/Strawberry/perl/bin/perl.exe -w use warnings; use Image::Thumbnail; $imgdir= "C:/Users/41786/OneDrive/Documents/recordz1/upload"; #my $t = new Image::Thumbnail( # module => 'Imager', # size => 55, # create => 1, # input => "$imgdir/282.jpg", # outputpath => "$imgdir/test.jpg", #); # With Image Magick my $t = new Image::Thumbnail( size => "55x75", create => 1, module => "Image::Magick", input => "$imgdir/282.jpg", outputpath => "$imgdir/test.jpg");
EDIT 2 I tried to download from the cpan repository and then updated the make file pl filecpan install Image::Magick Loading internal logger. Log::Log4perl recommended for better logging CPAN::SQLite not installed, trying to work without Reading 'C:\STRAWB~1\cpan\Metadata' Database was generated on Sat, 07 Jan 2023 16:17:02 GMT Running install for module 'Image::Magick' CPAN: Digest::SHA loaded ok (v6.02) CPAN: Compress::Zlib loaded ok (v2.086) Checksum for C:\STRAWB~1\cpan\sources\authors\id\J\JC\JCRISTY\Image-Ma +gick-7.0.11-3.tar.gz ok CPAN: Archive::Tar loaded ok (v2.32) CPAN: YAML::XS loaded ok (v0.78) CPAN: CPAN::Meta::Requirements loaded ok (v2.140) CPAN: CPAN::Meta loaded ok (v2.150010) Configuring J/JC/JCRISTY/Image-Magick-7.0.11-3.tar.gz with Makefile.PL Gonna create 'libMagickCore.a' from 'C:\Program Files\ImageMagick-7.0. +8-Q16\CORE_RL_MagickCore_.dll' Checking if your kit is complete... Looks good Have \xampp\perl\lib Want \strawb~1\perl\lib Your perl and your Config.pm seem to have different ideas about the architecture they are running on. Perl thinks: [lib] Config says: [MSWin32-x64-multi-thread] This may or may not cause problems. Please check your installation of +perl if you have problems building this extension. Generating a gmake-style Makefile Writing Makefile for Image::Magick Writing MYMETA.yml and MYMETA.json JCRISTY/Image-Magick-7.0.11-3.tar.gz C:\xampp\perl\bin\perl.exe Makefile.PL -- OK Running make for J/JC/JCRISTY/Image-Magick-7.0.11-3.tar.gz CPAN: Module::CoreList loaded ok (v5.20190522) cp Magick.pm blib\lib\Image\Magick.pm AutoSplitting blib\lib\Image\Magick.pm (blib\lib\auto\Image\Magick) Running Mkbootstrap for Magick () "C:\xampp\perl\bin\perl.exe" -MExtUtils::Command -e chmod -- 644 "Magi +ck.bs" "C:\xampp\perl\bin\perl.exe" -MExtUtils::Command::MM -e cp_nonempty -- + Magick.bs blib\arch\auto\Image\Magick\Magick.bs 644 "C:\xampp\perl\bin\perl.exe" "C:\xampp\perl\lib\ExtUtils/xsubpp" -typ +emap C:\STRAWB~1\perl\lib\ExtUtils\typemap -typemap C:\STRAWB~1\cpan\ +build\Image-Magick-7.0.11-2\typemap Magick.xs > Magick.xsc "C:\xampp\perl\bin\perl.exe" -MExtUtils::Command -e mv -- Magick.xsc M +agick.c gcc -c -I"C:\Program Files\ImageMagick-7.0.8-Q16\include" -s -O2 -DWI +N32 -DWIN64 -DCONSERVATIVE -D__USE_MINGW_ANSI_STDIO -DPERL_TEXTMODE_S +CRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwra +pv -fno-strict-aliasing -mms-bitfields -s -O2 -DVERSION=\"7.0.11\" +-DXS_VERSION=\"7.0.11\" "-IC:\STRAWB~1\perl\lib\CORE" -D_LARGE_FILE +S=1 -DHAVE_CONFIG_H Magick.c Magick.xs: In function 'XS_Image__Magick_Mogrify': Magick.xs:11569:18: warning: implicit declaration of function 'KmeansI +mage'; did you mean 'ShearImage'? [-Wimplicit-function-declaration] (void) KmeansImage(image,geometry_info.rho,geometry_info.si +gma, ^~~~~~~~~~~ ShearImage Magick.xs:11590:18: warning: implicit declaration of function 'ColorTh +resholdImage'; did you mean 'AutoThresholdImage'? [-Wimplicit-functio +n-declaration] (void) ColorThresholdImage(image,&start_color,&stop_color,e +xception); ^~~~~~~~~~~~~~~~~~~ AutoThresholdImage Magick.xs:11596:18: warning: implicit declaration of function 'WhiteBa +lanceImage'; did you mean 'SteganoImage'? [-Wimplicit-function-declar +ation] (void) WhiteBalanceImage(image,exception); ^~~~~~~~~~~~~~~~~ SteganoImage Magick.xs:11625:17: warning: implicit declaration of function 'Bilater +alBlurImage'; did you mean 'RotationalBlurImage'? [-Wimplicit-functio +n-declaration] image=BilateralBlurImage(image,(size_t) geometry_info.rho,( +size_t) ^~~~~~~~~~~~~~~~~~ RotationalBlurImage Magick.xs:11625:16: warning: assignment to 'Image *' {aka 'struct _Ima +ge *'} from 'int' makes pointer from integer without a cast [-Wint-co +nversion] image=BilateralBlurImage(image,(size_t) geometry_info.rho,( +size_t) ^ Magick.xs:11633:18: warning: implicit declaration of function 'SortIma +gePixels'; did you mean 'CopyImagePixels'? [-Wimplicit-function-decla +ration] (void) SortImagePixels(image,exception); ^~~~~~~~~~~~~~~ CopyImagePixels Magick.xs: In function 'XS_Image__Magick_QueryFormat': Magick.xs:13745:22: error: 'MagickInfo' {aka 'const volatile struct _M +agickInfo'} has no member named 'magick_module' if (magick_info->magick_module == (char *) NULL) ^~ In file included from C:\STRAWB~1\perl\lib\CORE/perl.h:5547, from Magick.xs:58: Magick.xs:13748:45: error: 'MagickInfo' {aka 'const volatile struct _M +agickInfo'} has no member named 'magick_module' PUSHs(sv_2mortal(newSVpv(magick_info->magick_module,0))); ^~ C:\STRAWB~1\perl\lib\CORE/pp.h:455:28: note: in definition of macro 'P +USHs' #define PUSHs(s) (*++sp = (s)) ^ Magick.xs:13748:15: note: in expansion of macro 'sv_2mortal' PUSHs(sv_2mortal(newSVpv(magick_info->magick_module,0))); ^~~~~~~~~~ Magick.xs:13748:26: note: in expansion of macro 'newSVpv' PUSHs(sv_2mortal(newSVpv(magick_info->magick_module,0))); ^~~~~~~ gmake: *** [Makefile:347: Magick.o] Error 1 JCRISTY/Image-Magick-7.0.11-3.tar.gz C:\STRAWB~1\c\bin\gmake.exe -- NOT OK Stopping: 'install' failed for 'Image::Magick'.
But I run gmake I got the following exception# try to detect 'include' dir push @i, catfile($dirpath,'include'); push @i, catfile($dirpath,'include','ImageMagick'); push @i, catfile($dirpath,'..','include'); push @i, catfile($dirpath,'..','include','ImageMagick'); push @i, catfile($dirpath,'..','..','include'); push @i, catfile($dirpath,'..','..','include','ImageMagick'); push @i, catfile($dirpath,'..','..','..','include'); push @i, catfile($dirpath,'..','..','..','include','ImageMagick' +); push @i, catfile($dirpath,'..','..','include','ImageMagick'); push @i, catfile($dirpath,'..','..','..','include'); push @i, catfile($dirpath,'..','..','..','include','ImageMagick' +); foreach (@i) { push @incdir, $_ if (-e "$_/MagickCore/MagickCore +.h") };
gmake "C:\xampp\perl\bin\perl.exe" -MExtUtils::Command::MM -e cp_nonempty -- + Magick.bs blib\arch\auto\Image\Magick\Magick.bs 644 gcc -c -I"C:\Program Files\ImageMagick-7.0.8-Q16\include" -s -O2 -DWI +N32 -DWIN64 -DCONSERVATIVE -D__USE_MINGW_ANSI_STDIO -DPERL_TEXTMODE_S +CRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwra +pv -fno-strict-aliasing -mms-bitfields -s -O2 -DVERSION=\"7.0.11\" +-DXS_VERSION=\"7.0.11\" "-IC:\STRAWB~1\perl\lib\CORE" -D_LARGE_FILE +S=1 -DHAVE_CONFIG_H Magick.c Magick.xs: In function 'XS_Image__Magick_Mogrify': Magick.xs:11569:18: warning: implicit declaration of function 'KmeansI +mage'; did you mean 'ShearImage'? [-Wimplicit-function-declaration] (void) KmeansImage(image,geometry_info.rho,geometry_info.si +gma, ^~~~~~~~~~~ ShearImage Magick.xs:11590:18: warning: implicit declaration of function 'ColorTh +resholdImage'; did you mean 'AutoThresholdImage'? [-Wimplicit-functio +n-declaration] (void) ColorThresholdImage(image,&start_color,&stop_color,e +xception); ^~~~~~~~~~~~~~~~~~~ AutoThresholdImage Magick.xs:11596:18: warning: implicit declaration of function 'WhiteBa +lanceImage'; did you mean 'SteganoImage'? [-Wimplicit-function-declar +ation] (void) WhiteBalanceImage(image,exception); ^~~~~~~~~~~~~~~~~ SteganoImage Magick.xs:11625:17: warning: implicit declaration of function 'Bilater +alBlurImage'; did you mean 'RotationalBlurImage'? [-Wimplicit-functio +n-declaration] image=BilateralBlurImage(image,(size_t) geometry_info.rho,( +size_t) ^~~~~~~~~~~~~~~~~~ RotationalBlurImage Magick.xs:11625:16: warning: assignment to 'Image *' {aka 'struct _Ima +ge *'} from 'int' makes pointer from integer without a cast [-Wint-co +nversion] image=BilateralBlurImage(image,(size_t) geometry_info.rho,( +size_t) ^ Magick.xs:11633:18: warning: implicit declaration of function 'SortIma +gePixels'; did you mean 'CopyImagePixels'? [-Wimplicit-function-decla +ration] (void) SortImagePixels(image,exception); ^~~~~~~~~~~~~~~ CopyImagePixels Magick.xs: In function 'XS_Image__Magick_QueryFormat': Magick.xs:13745:22: error: 'MagickInfo' {aka 'const volatile struct _M +agickInfo'} has no member named 'magick_module' if (magick_info->magick_module == (char *) NULL) ^~ In file included from C:\STRAWB~1\perl\lib\CORE/perl.h:5547, from Magick.xs:58: Magick.xs:13748:45: error: 'MagickInfo' {aka 'const volatile struct _M +agickInfo'} has no member named 'magick_module' PUSHs(sv_2mortal(newSVpv(magick_info->magick_module,0))); ^~ C:\STRAWB~1\perl\lib\CORE/pp.h:455:28: note: in definition of macro 'P +USHs' #define PUSHs(s) (*++sp = (s)) ^ Magick.xs:13748:15: note: in expansion of macro 'sv_2mortal' PUSHs(sv_2mortal(newSVpv(magick_info->magick_module,0))); ^~~~~~~~~~ Magick.xs:13748:26: note: in expansion of macro 'newSVpv' PUSHs(sv_2mortal(newSVpv(magick_info->magick_module,0))); ^~~~~~~ gmake: *** [Makefile:347: Magick.o] Error 1 PS C:\Users\41786\Dropbox\PC\Downloads\Image-Magick-7.0.11-3\Image-Mag +ick-7.0.11>
In reply to Re^4: Image magic creation of thumb fail
by *alexandre*
in thread Image magic creation of thumb fail
by *alexandre*
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |