![]() |
#16 | |
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:
I had a similar problem when writing mobi2imp.pl where the resulting images would fail to show up in the ereader. What I did was, using GD, just copyResized the images but not actually resize them. What this did was rewrite the images using the GD library and those images would then load and show up properly. Maybe Mobipocket Creator does something similar, internally. Sample code (you originally wrote this!) fixing this issue in mobi2perl.pl: Code:
sub fix_image_tags { my $tree = shift; my @imgel = $tree->find ("img"); foreach my $img (@imgel) { my $recindex = $img->attr ("recindex"); my $ind = int ($recindex); my $filename = $image_index_to_filename{$ind}; ################################################################### #For .IMP start - just rewrite .jpg/.png/.gif image files (fixes non-stnd pics) # if (defined $opt_verbose || defined $opt_debug){ print "FIXED IMAGE/TAGS: $recindex - $ind - $filename\n"; } my $imagefile = "$explodedir/$filename"; my $supportedimage = 0; #my ($body,$path,$ext) = fileparse("$imagefile",'\.\w+'); my $im = $imagefile; $im =~ /\.jpe?g$/i and $im = GD::Image->newFromJpeg($imagefile,1) and $supportedimage = 1; $im =~ /\.gif$/i and $im = GD::Image->newFromGif($imagefile) and $supportedimage = 1 and $im->transparent(-1); #use only non-transparent .gifs; $im =~ /\.png$/i and $im = GD::Image->newFromPng($imagefile) and $supportedimage = 1; #$im =~ /\.bmp$/i and next; # not yet implemented in GD, but hopefully not needed here! if ($supportedimage) { my ($width, $height) = $im->getBounds(); my $target_im = new GD::Image($width,$height,1); $target_im->copyResized($im,0,0,0,0,$width,$height,$width,$height); open(IMAGE, "> $imagefile"); binmode(IMAGE); if ($imagefile =~ /\.jpe?g$/i){ print IMAGE $target_im->jpeg(85); } elsif ($imagefile =~ /\.gif$/i) { print IMAGE $target_im->gif(); } elsif ($imagefile =~ /\.png$/i) { print IMAGE $target_im->png(); } #elsif ($imagefile =~ /\.bmp$/i) { # print IMAGE $target_im->bmp(); #} close(IMAGE); } # #For .IMP end ################################################################### $img->attr ("recindex", undef); $img->attr ("src", $filename); } } |
|
![]() |
![]() |
![]() |
#17 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
|
I have kind of tested this since I resized to different sizes to try to find if there was a limit. So just saving them again was not enough.
|
![]() |
![]() |
![]() |
#18 | |
eBook Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,544
Karma: 93383099
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#19 |
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
|
|
![]() |
![]() |
![]() |
#20 | |
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:
Can you try creating a simple ebook (.html with a few large images known to crash the the Gen3) and produce a .prc with Mobipocket Creator and 'html2mobi.exe' with no resizing and compare the internals of the .prc? Obviously, there is something different. It could be a database entry is missing, misinterpreted or the images are different. This would be a start. Also, if you explode the two .prc's prepared above using 'mobi2html --rawhtml', and post the results here, I and others can help locating the source of this "bug"; be it firmware or mobiperl related. |
|
![]() |
![]() |
![]() |
#21 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
|
Quote:
|
|
![]() |
![]() |
![]() |
#22 |
Hi There!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,473
Karma: 2930523
Join Date: Feb 2008
Location: Ft Lauderdale
Device: iPad
|
I can't praise Fictionwise's customer service highly enough. Click thru to their support email and ask them for advice. I'm sure you will get a quick answer.
|
![]() |
![]() |
![]() |
#23 | |
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:
Obviously, i don't have a Gen3, but I do use mobiperl to create .prc and I too would not need the resizing. Seems like a win-win to me. ![]() |
|
![]() |
![]() |
![]() |
#24 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
|
Quote:
|
|
![]() |
![]() |
![]() |
#25 | |
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:
I personally don't use .prc files, but I would like to generate them for others to use. I have installled my own work-around so for me it's a moot point. However, your MobiPerl suite of programs, by default, resize images, even if the .prc file has no issues displaying on the Gen3 or any other ereader supporting this Mobipocket format. Imagine the (poor) iLiad user that has a 768x935 screen and it only shows 480x640 images! I guess, the only ones that would have to install mobiperl, now, would be those Gen3 users that have not updated their firmware. Time will tell what is truly needed here (or not)! |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Read all about it! Device owners read more books, magazines and newspapers | dacattt | News | 24 | 10-21-2012 04:43 AM |
A Mobile Read 'Essential Books to Read' list | ficbot | Reading Recommendations | 41 | 09-24-2010 10:31 AM |
Find me some books to read based on what I have recently read (and liked) | rahulm | Reading Recommendations | 16 | 08-11-2010 03:18 PM |
Free books from Open Books to celebrate 'Read An E-Book Week' | Kelly Huddleston | Deals and Resources (No Self-Promotion or Affiliate Links) | 10 | 03-08-2010 12:24 PM |
What books from Mobile Read have you read? | ficbot | Reading Recommendations | 29 | 08-01-2009 05:39 PM |