Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image support relies on external (non Perl) imlib2 program, no Windows support #32

Open
kimryan opened this issue Apr 3, 2014 · 7 comments

Comments

@kimryan
Copy link

kimryan commented Apr 3, 2014

To insert images, the Image::Imlib2 module is a dependency. This in turn requires the imlib2 program to be installed.

This package is only available for Linux, no Windows version, which means I can't create any images if I want to use this module. Also Imlib2 doesn't seem to have many recent updates, and some people have had trouble configuring it: http://cpanratings.perl.org/dist/Image-Imlib2

There are several pure perl modules that will rescale images, including Image::Imager and Image::Scale . They will work on all operating systems and seem to be more actively maintained

If it is not practical for you to switch to one of these alternatives, I suggest you add a LIMITATION section to your documentation, outlining no MS Windows support.

A note about needing to install imlib2 binaries or compile the package locally would also help, but may this should probably go into the MOBI::Image module doco.

@kimryan kimryan changed the title Image support relies on external (non Perl) library Imlib2 Image support relies on external (non Perl) imlib2 program, no Windows support Apr 3, 2014
@borisdaeppen
Copy link
Owner

I replaced GD with Imlib2, because I thought it is handier. But pure Perl would be awesome. Patches are welcome.

@kimryan
Copy link
Author

kimryan commented Apr 7, 2014

I did a bit more research. The Imager module looks good but is fairly large and still requires libjpeg to be installed. Also found that you can download libjpeg and imlib2 binaries for windows by installing cygwin. I was wrong to say no Windows support (just no ActiveState support) for this module

So given that, Image::Imlib2 is probably the best module to do the image rescaling.

This module is failing on many of the cpan testers results because they do not have these graphics libraries installed locally. So could you please add a POD section along the following lines and then we could close this issue:


=head2 LIMITATIONS

A development version of Imlib2 and libjpeg must be installed locally before installing this module.

@borisdaeppen
Copy link
Owner

Patch will be accepted

@borisdaeppen
Copy link
Owner

Since I'm not aware anymore of all the details...

imlib2 binaries are needed for Image::Imlib2 if you want to use EBook::Mobi::Image, but are you sure libjpeg binaries are also needed? If yes, which Perl library demands it?

The Limitations-Section would make sense in the POD of EBook::MOBI::Image, not EBook::MOBI I think.

@kimryan
Copy link
Author

kimryan commented Jul 23, 2014

Take a look here, you can see libjpeg listed as a dependency of Imlib2, not the perl Imlib2 module
http://www.linuxfromscratch.org/blfs/view/6.3/general/imlib2.html . But without a working Imlib2 binary, the perl module will fail.

Agree, Ebook::Mobi::Image is best palce for this limitation note,

@borisdaeppen
Copy link
Owner

Trial is uploaded: https://metacpan.org/release/BORISD/EBook-MOBI-Image-0.16-TRIAL

Can you please test it, since I don't have the setup for it atm.

I just mentioned Imlib2 since libjpeg is a subdependency, as others to... I see no reason why to mention this one, but not others like FreeType and libpng-1.2.29. This is in the hands of Imlib2 and not EBook::MOBI, can also change in the future.

@kimryan
Copy link
Author

kimryan commented Jul 24, 2014

Hi Boris,

I am not able to test the Image module, as I run Windows and do not have
binaries for Imlib2 and libjpeg, and they are quite tricky to install. I
suggest you upload anyway and CPAN testers can check it. Fair enough that
libjpeg is a sub dependency

The only problem I can see is the version numbering which I have mentioned
before
You have
our $VERSION = 0.16;
but the correct format,in quotes
our $VERSION = '0.16’;

And they should go up in sequence, so jumping from 0.69 to 0.7 (which is
what happened for the last MOBI.pm module) is not good practice, and can
cause problems with the build and archiving process. It should be '0.70'

Regards,

Kim
From: Boris Däppen
Sent: Wednesday, July 23, 2014 9:51 PM
To: borisdaeppen/EBook--MOBI
Cc: kimryan
Subject: Re: [EBook--MOBI] Image support relies on external (non Perl)
imlib2 program, no Windows support (#32)

Trial is uploaded:
https://metacpan.org/release/BORISD/EBook-MOBI-Image-0.16-TRIAL

Can you please test it, since I don't have the setup for it atm.

I just mentioned Imlib2 since libjpeg is a subdependency, as others to... I
see no reason why to mention this one, but not others like FreeType and
libpng-1.2.29. This is in the hands of Imlib2 and not EBook::MOBI, can also
change in the future.


Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants