Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > More E-Book Readers > Bookeen

Notices

Reply
 
Thread Tools Search this Thread
Old 04-17-2008, 10:24 AM   #16
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
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:
Originally Posted by tompe View Post
The thing is that nearly all files with large images generated by MobiPerl has these problems but files generated with MobiPocket Creator with the same images generally do not have the problem.
tompe:

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);
    }
}
Just a thought!
nrapallo is offline   Reply With Quote
Old 04-17-2008, 10:53 AM   #17
tompe
Grand Sorcerer
tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.
 
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.
tompe is offline   Reply With Quote
Old 04-17-2008, 10:56 AM   #18
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383099
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Quote:
Originally Posted by nrapallo View Post
By the way, do any Cybook Gen 3 users have issue with any of the HarryT Jane Austen Classics in .prc format? Those use large images!
They all work. Do you think I'd post a book for the Gen3 which didn't?
HarryT is offline   Reply With Quote
Old 04-17-2008, 11:01 AM   #19
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
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:
Originally Posted by HarryT View Post
They all work. Do you think I'd post a book for the Gen3 which didn't?
Touche, I forgot that you have a Gen 3!
nrapallo is offline   Reply With Quote
Old 04-17-2008, 11:12 AM   #20
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
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:
Originally Posted by tompe View Post
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.
Ok we are getting somewhere!

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.
nrapallo is offline   Reply With Quote
Old 04-17-2008, 12:09 PM   #21
tompe
Grand Sorcerer
tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.
 
Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
Quote:
Originally Posted by nrapallo View Post
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.
Actually, I think I misstated or misremembered. For some reason the images I had as test cases caused problems. Bur when I took one of the problematic files and used mobigen the result was still a file that crashed the Cybook. So it might just be that the images I used was more problematic than images other people use in Mobipocket Creator. I can no longer test for this problem since I have updated the firmware.
tompe is offline   Reply With Quote
Old 04-17-2008, 12:13 PM   #22
DixieGal
Hi There!
DixieGal ought to be getting tired of karma fortunes by now.DixieGal ought to be getting tired of karma fortunes by now.DixieGal ought to be getting tired of karma fortunes by now.DixieGal ought to be getting tired of karma fortunes by now.DixieGal ought to be getting tired of karma fortunes by now.DixieGal ought to be getting tired of karma fortunes by now.DixieGal ought to be getting tired of karma fortunes by now.DixieGal ought to be getting tired of karma fortunes by now.DixieGal ought to be getting tired of karma fortunes by now.DixieGal ought to be getting tired of karma fortunes by now.DixieGal ought to be getting tired of karma fortunes by now.
 
DixieGal's Avatar
 
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.
DixieGal is offline   Reply With Quote
Old 04-17-2008, 12:39 PM   #23
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
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:
Originally Posted by tompe View Post
Actually, I think I misstated or misremembered. For some reason the images I had as test cases caused problems. Bur when I took one of the problematic files and used mobigen the result was still a file that crashed the Cybook. So it might just be that the images I used was more problematic than images other people use in Mobipocket Creator. I can no longer test for this problem since I have updated the firmware.
So to resolve this, why don't you offer your 'mobi2mobi' solution for Gen3 users with the old firmware and allow the switch to not resize for those users, like yourself, that have updated the firmware.

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.
nrapallo is offline   Reply With Quote
Old 04-17-2008, 04:28 PM   #24
tompe
Grand Sorcerer
tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.
 
Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
Quote:
Originally Posted by nrapallo View Post
So to resolve this, why don't you offer your 'mobi2mobi' solution for Gen3 users with the old firmware and allow the switch to not resize for those users, like yourself, that have updated the firmware.

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.
Why would people have to install MobiPerl programs just to read a file they have downloaded from some site?
tompe is offline   Reply With Quote
Old 04-17-2008, 04:47 PM   #25
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
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:
Originally Posted by tompe View Post
Why would people have to install MobiPerl programs just to read a file they have downloaded from some site?
I thought that if a downloaded .prc file crashed the Gen3, then there was a solution that 'mobi2mobi --gen3imagefix' offers in that the images are resized and thereby allowing those Gen3 users to now properly use that file (that they downloaded elsewhere and maybe was created by others using say mobigen). I believe the original poster above found this solution useful.

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)!
nrapallo is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 07:47 PM.


MobileRead.com is a privately owned, operated and funded community.