Go Back   Armenian Knowledge Base > Technical sections > Webmaster Zone > Web Development

Reply
 
Thread Tools

JPEG::Text (perl module)
Old 11.11.2002, 05:56   #1
Guest
 
Posts: n/a
Post JPEG::Text (perl module)

Someone is aware? is there a ready-made perl module for parsing jpeg images with clear text appended to the end of the file?

10x in advance.

Old 11.11.2002, 06:04   #2
¡no pasaran!
 
dolphin's Avatar
 
Join Date: 03 2002
Location: localhost
Age: 43
Posts: 540
Rep Power: 5
Question

to est'?

sorry, nedoponjal...
__________________
[ que fors aus ne le sot riens nee ]

Old 11.11.2002, 17:24   #3
VX
Консервативн
 
VX's Avatar
 
Join Date: 01 2002
Location: Кавказская Албания
Posts: 889
Rep Power: 0
Post

You must use GD perl module to work with images.

Using GD you can do everything with .jpg .png .tiff images, gif is not supported however i's commercal.
__________________
Праздник к нам приходит...

|^^^^^^^^^'''^\| ||\__
| ВОДКА-ВОДКА | ||','''|'''''''\_____,_
| _..... _ | ||_ _|'__|_____||.........| |
'(@)'(@)'(@)''''''''''''''''''''''*|(@)""""|(@)*

Old 12.11.2002, 02:43   #4
Дошкольник
 
Dark Abyss of Yerevan's Avatar
 
Join Date: 01 2002
Location: hell
Posts: 124
Rep Power: 0
Post

I'm not sure but I think author was asking for a text recognition lib, and not just a lib for basic image manipulation.
__________________
[x]-=-[ ]-=-[x]

Old 12.11.2002, 16:51   #5
Guest
 
Posts: n/a
Rep Power:
Post

OK, for you to fully understand the matter, please view this picture by means of a simple ASCII viewr (the final part) or use `tail' command.
Later give me an advise how to parse this text size by means of perl or PHP.
I think there must be a module. BTW, I tried to do it using standart UNIX stream commands but it was using too much CPU time and taking into consideration the amount of the job done in that direction every day the matter will cost me high in resources.
That is Y I'm lookin' for a ready way develeped by a professional programmer.

Please, get this pic for additional information.
http://never.land.am/~stealth/pics/D....111102.185810
Please, also note, that these files come with no known extension, so you are not to treat it as an error.
Thank you in advance.

Old 12.11.2002, 17:06   #6
»
 
z0mbie's Avatar
 
Join Date: 01 2002
Posts: 777
Rep Power: 0
Post

а во всех image-ах формат текста одинаковый ? например строка "---------------------------------------------------------------" во всех есть ?

Old 12.11.2002, 17:55   #7
Guest
 
Posts: n/a
Rep Power:
Post

Quote:
Originally posted by z0mbie:
а во всех image-ах формат текста одинаковый ? например строка "---------------------------------------------------------------" во всех есть ?
Да, строка --------------- во всех есть, правда, количество строк текста может различаться, но приблизительно 6-8 строк.

Old 12.11.2002, 18:42   #8
»
 
z0mbie's Avatar
 
Join Date: 01 2002
Posts: 777
Rep Power: 0
Post

вот, это записывает в $text все что находится в файле после жпег картинки

Code:
 

$maxtextsize=1000;
$f=fopen("image.jpg","rb");
for($i=1;$i<=$maxtextsize;$i++){
	fseek($f,-$i,SEEK_END);
	if(ord(fread($f,1))==0xFF && ord(fread($f,1))==0xD9) break;
}
	 
while(!feof($f)) $text.=fread($f,100);

Old 12.11.2002, 18:42   #9
»
 
z0mbie's Avatar
 
Join Date: 01 2002
Posts: 777
Rep Power: 0
Post

Reply




Реклама:
реклама
Buy text link .

All times are GMT. The time now is 23:44.
Top

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.