Why only limited JPG / JPEG support...?

The place for "I can't figure out how to..." questions.
Post Reply
another
User
Posts: 2
Joined: Mon Jun 12, 2006 2:35 am

Why only limited JPG / JPEG support...?

Post by another » Mon Jun 12, 2006 2:45 am

I cannot figure out why there is not support for JPG / JPEG width and height information...!!?

Not to mention many other details.

Searched forums, nothing mentioned.
Read the sources and couldn't find anything even remotely close.

Doesn't seem logical to require using some other script to retrieve the info.

Fixed by changing the source of modules.graphics.jpeg.php from:

Code: Select all

fseek($fd, $ThisFileInfo['avdataoffset'], SEEK_SET);

list($width, $height, $type) = getid3_lib::GetDataImageSize(fread($fd, $ThisFileInfo['filesize']));
if ($type == 2) {

Code: Select all

fseek($fd, $ThisFileInfo['avdataoffset'], SEEK_SET);

list($width, $height, $type) = getid3_lib::GetDataImageSize(fread($fd, $ThisFileInfo['filesize']));
list($ThisFileInfo['video']['width'], $ThisFileInfo['video']['height'], $tempx, $tempx) = getimagesize($ThisFileInfo['filenamepath']);
if ($type == 2) {
:x

another
User
Posts: 2
Joined: Mon Jun 12, 2006 2:35 am

Post by another » Mon Jun 12, 2006 2:52 am

And since we're fixing (with chewing gum) this unbelievable hole we want to support the proper structure:

Code: Select all

fseek($fd, $ThisFileInfo['avdataoffset'], SEEK_SET);

list($width, $height, $type) = getid3_lib::GetDataImageSize(fread($fd, $ThisFileInfo['filesize']));
list($ThisFileInfo['video']['resolution_x'], $ThisFileInfo['video']['resolution_y'], $tempx, $tempx) = getimagesize($ThisFileInfo['filenamepath']);
		$ThisFileInfo[$ThisFileInfo['video']['dataformat']]['header']['raw']['width'] = $ThisFileInfo['video']['resolution_x'];
		$ThisFileInfo[$ThisFileInfo['video']['dataformat']]['header']['raw']['height'] = $ThisFileInfo['video']['resolution_y'];
if ($type == 2) {

Allan Hansen
getID3() v2 developer
Posts: 445
Joined: Sun May 04, 2003 2:22 pm
Location: Holmegaard, Denmark

Post by Allan Hansen » Mon Jun 12, 2006 9:47 am

There is a bug in getid3_lib from 1.7.6, which breaks the JPEG module.

Use getID3() 1.7.5 or wait for about a week for 1.7.7.

vollmerk
User
Posts: 18
Joined: Wed Jun 14, 2006 9:42 pm

Post by vollmerk » Wed Jun 14, 2006 9:50 pm

This may be a slightly unrelated bug, however I'm using 1.7.6 and experiencing my share of getimagesize() errors when reading tags off of audio files (mp3s) The exact error I get is

[Runtime Error] getimagesize() [<a href='function.getimagesize'>function.getimagesize</a>]: Read error!
on line 1176 in getid3/getid3.lib.php

This error never occured in 1.7.5 soo I guess I should wait for 1.7.7? Any eta on it's release?

Thanks,
-Karl Vollmer
vollmer||AT||ampache.org

Allan Hansen
getID3() v2 developer
Posts: 445
Joined: Sun May 04, 2003 2:22 pm
Location: Holmegaard, Denmark

Post by Allan Hansen » Thu Jun 15, 2006 8:55 am

vollmerk wrote:This may be a slightly unrelated bug
No, this is the exact bug that breaks the JPEG module.

vollmerk wrote: This error never occured in 1.7.5 soo I guess I should wait for 1.7.7? Any eta on it's release?
A quick fix: Copy getid3_lib from 1.7.5 to 1.7.6

ETA: This or next weekend - along with 2.0.0 final.

Post Reply