Armenian Knowledge Base  

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

Reply
 
LinkBack Thread Tools
Old 11.11.2002, 05:56   #1
Guest
 
Posts: n/a
Downloads:
Uploads:
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.
Reply With Quote
Old 11.11.2002, 06:04   #2
¡no pasaran!
 
dolphin's Avatar
 
Join Date: 03 2002
Location: localhost
Age: 35
Posts: 540
Downloads: 0
Uploads: 0
Reputation: 13 | 4
Question

to est'?

sorry, nedoponjal...
Reply With Quote
Old 11.11.2002, 17:24   #3
Консервативн
 
VX's Avatar
 
Join Date: 01 2002
Location: Кавказская Албания
Posts: 889
Downloads: 0
Uploads: 0
Reputation: 0 | 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.
Reply With Quote
Old 12.11.2002, 02:43   #4
Дошкольник
 
Dark Abyss of Yerevan's Avatar
 
Join Date: 01 2002
Location: hell
Posts: 124
Downloads: 0
Uploads: 0
Reputation: 0 | 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.
Reply With Quote
Old 12.11.2002, 16:51   #5
Guest
 
Posts: n/a
Downloads:
Uploads:
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.
Reply With Quote
Old 12.11.2002, 17:06   #6
»
 
z0mbie's Avatar
 
Join Date: 01 2002
Posts: 777
Downloads: 1
Uploads: 0
Reputation: 0 | 0
Post

а во всех image-ах формат текста одинаковый ? например строка "---------------------------------------------------------------" во всех есть ?
Reply With Quote
Old 12.11.2002, 17:55   #7
Guest
 
Posts: n/a
Downloads:
Uploads:
Post

Quote:
Originally posted by z0mbie:
а во всех image-ах формат текста одинаковый ? например строка "---------------------------------------------------------------" во всех есть ?
Да, строка --------------- во всех есть, правда, количество строк текста может различаться, но приблизительно 6-8 строк.
Reply With Quote
Old 12.11.2002, 18:42   #8
»
 
z0mbie's Avatar
 
Join Date: 01 2002
Posts: 777
Downloads: 1
Uploads: 0
Reputation: 0 | 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);
Reply With Quote
Old 12.11.2002, 18:42   #9
»
 
z0mbie's Avatar
 
Join Date: 01 2002
Posts: 777
Downloads: 1
Uploads: 0
Reputation: 0 | 0
Post

Reply With Quote
Sponsored Links
Reply

Thread Tools


На правах рекламы:
реклама

All times are GMT. The time now is 00:15.


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