|  06-11-2009, 10:21 AM | #781 | 
| eBook Enthusiast            Posts: 85,560 Karma: 93980341 Join Date: Nov 2006 Location: UK Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6 | 
			
			It does work. For maps, etc, I get dramatically better quality in the final book by using "--imagerescale 0". That's one of the reasons I wanted to try out "opf2mobi", because in Mobi Creator there's no way to stop the image quality being degraded to get the image under 64k.
		 | 
|   |   | 
|  06-11-2009, 10:21 AM | #782 | |
| frumious Bandersnatch            Posts: 7,570 Karma: 20150435 Join Date: Jan 2008 Location: Spaniard in Sweden Device: Cybook Orizon, Kobo Aura | Quote: 
 In MobiPerl/Util.pm, there's this: Code:     # pdurrant
    # do not resize large images if the filesize is OK,
    # even if pixel dimensions are large
    if ($filesize < $maxsize and
       ((not $rescale_large_images) || ($x <= $maxwidth and $y <= maxheight))
       and $type ne "PNG"
       and (not defined $scale_factor or $scale_factor == 1.0)) {
       # No transformation has to be done, keep data as is
       ...
    }Code:     if (($filesize < $maxsize and
        ((not $rescale_large_images) || ($x <= $maxwidth and $y <= $maxheight))
        and $type ne "PNG"
        and (not defined $scale_factor or $scale_factor == 1.0)) or (not $rescale_large_images)) { | |
|   |   | 
|  06-11-2009, 12:08 PM | #783 | 
| GuteBook/Mobi2IMP Creator            Posts: 2,958 Karma: 2530691 Join Date: Dec 2007 Location: Toronto, Canada Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN | 
			
			Jellby, you are right! Not that I'm taking sides...   In my modified html2mobi.pl file that I call from within PDFRead, I sort of disable the automatic Palm image quality reduction which "fits" images within its maxsize (60K) by upping the maxsize to say, triple, that i.e. 180k. Code: - In MobiPerl/Util.pm, changed bold part:
       my $maxsize = 61000*3; | 
|   |   | 
|  06-11-2009, 12:18 PM | #784 | 
| Grand Sorcerer            Posts: 7,452 Karma: 7185064 Join Date: Oct 2007 Location: Linköpng, Sweden Device: Kindle Voyage, Nexus 5, Kindle PW | 
			
			This is strange. My memory says that I allowed larger images in term of number of bytes but the code as you point out seems to say something else.  I remember being very unwilling allow it but thought I gave in... I might just add a new flag...
		 | 
|   |   | 
|  06-11-2009, 12:31 PM | #785 | |
| GuteBook/Mobi2IMP Creator            Posts: 2,958 Karma: 2530691 Join Date: Dec 2007 Location: Toronto, Canada Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN | Quote: 
   | |
|   |   | 
|  06-11-2009, 12:56 PM | #786 | 
| eBook Enthusiast            Posts: 85,560 Karma: 93980341 Join Date: Nov 2006 Location: UK Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6 | 
			
			Curious. Why is it I wonder, in that case, that my maps, which are >64k in size, look so much better with "imagerescale=0" set? It really is a huge quality difference; text which is "blurry" with the default setting is clear and sharp with the flag set.
		 | 
|   |   | 
|  06-11-2009, 01:02 PM | #787 | |
| frumious Bandersnatch            Posts: 7,570 Karma: 20150435 Join Date: Jan 2008 Location: Spaniard in Sweden Device: Cybook Orizon, Kobo Aura | Quote: 
 There are these maxima: Dimensions: 640x480 pixels, it can be disabled with "--imagerescale 0" Filesize: 61440 bytes, it cannot be disabled with a flag (yet). If you want to test, run mobi2html on the generated mobi, and you'll see whether the image files were modified or not. | |
|   |   | 
|  06-11-2009, 01:04 PM | #788 | |
| eBook Enthusiast            Posts: 85,560 Karma: 93980341 Join Date: Nov 2006 Location: UK Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6 | Quote: 
 | |
|   |   | 
|  06-11-2009, 04:51 PM | #789 | 
| Grand Sorcerer            Posts: 7,452 Karma: 7185064 Join Date: Oct 2007 Location: Linköpng, Sweden Device: Kindle Voyage, Nexus 5, Kindle PW | |
|   |   | 
|  06-11-2009, 05:09 PM | #790 | 
| Grand Sorcerer            Posts: 7,452 Karma: 7185064 Join Date: Oct 2007 Location: Linköpng, Sweden Device: Kindle Voyage, Nexus 5, Kindle PW | 
			
			Since I have fixed some "bugs" I did a version 0.41 which is available at https://dev.mobileread.com/trac/mobiperl/ Let me know if I broke something (I have not tested it so much...) Changes in 0.0.42 
 Last edited by tompe; 06-11-2009 at 05:14 PM. | 
|   |   | 
|  06-11-2009, 05:41 PM | #791 | 
| Wizard            Posts: 1,154 Karma: 3252017 Join Date: Jan 2008 Location: Germany Device: Pocketbook Touch Lux (623) | 
			
			Changing user name to 'Anybody' in 5, 4, 3, ... :-D
		 | 
|   |   | 
|  06-11-2009, 05:48 PM | #792 | 
| Grand Sorcerer            Posts: 7,452 Karma: 7185064 Join Date: Oct 2007 Location: Linköpng, Sweden Device: Kindle Voyage, Nexus 5, Kindle PW | |
|   |   | 
|  06-11-2009, 05:58 PM | #793 | 
| GuteBook/Mobi2IMP Creator            Posts: 2,958 Karma: 2530691 Join Date: Dec 2007 Location: Toronto, Canada Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN | |
|   |   | 
|  06-12-2009, 03:08 AM | #794 | 
| eBook Enthusiast            Posts: 85,560 Karma: 93980341 Join Date: Nov 2006 Location: UK Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6 | 
			
			If someone could build Windows binaries I'd be grateful - I don't have PERL installed on my PC   . Edit: Ignore me - I'm overlooking what's right in front of me  . Last edited by HarryT; 06-12-2009 at 03:55 AM. | 
|   |   | 
|  06-12-2009, 11:02 AM | #795 | |
| frumious Bandersnatch            Posts: 7,570 Karma: 20150435 Join Date: Jan 2008 Location: Spaniard in Sweden Device: Cybook Orizon, Kobo Aura | Quote: 
 Ah... I see, it's the other link. | |
|   |   | 
|  | 
| Tags | 
| mobi2mobi, mobils | 
| Thread Tools | Search this Thread | 
| 
 | 
|  Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| Mobi2Mobi Mobi2Mobi v0.13 - GUI for Mobiperl tools | Jad | Kindle Formats | 476 | 03-15-2015 05:51 PM | 
| Tools for Editing Kindle .mobi Files? | GJN | Kindle Formats | 33 | 12-26-2013 02:05 PM | 
| Handy Perl Script to convert HTML0 files to smartquotes | maggotb0y | Sony Reader | 0 | 04-12-2007 11:49 AM | 
| PRS-500 Perl tools to generate Reader content | TadW | Sony Reader Dev Corner | 0 | 01-08-2007 05:55 AM | 
| gmail copy (gmcp) - Perl script to copy files to/from Gmail | Colin Dunstan | Lounge | 0 | 09-04-2004 01:24 PM |