AKB Forums

Go Back   AKB Forums > Technical sections > Languages, Compilers and Interpreters > Web Development
Home Register Blogs FAQ Members List Calendar Downloads Arcade Mark Forums Read

Web Development Java/PHP/Perl/ASP and more

Troubles when posting message? Click here! :: Проблемы с отправлением сообщения? Нажмите сюда!

Reply
 
LinkBack Thread Tools Display Modes
Old Nov 11, 2002, 05:56   #1
 
Posts: n/a
Reputation:
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 Quote selected
Old Nov 11, 2002, 06:04   #2
¡no pasaran!
 
dolphin's Avatar
 
Join Date: Mar 2002
Location: localhost
Posts: 538
Rep Power: 7
Reputation: 23
Send a message via ICQ to dolphin
Question

to est'?

sorry, nedoponjal...
__________________
[ que fors aus ne le sot riens nee ]
dolphin is offline   Reply With Quote Quote selected
Old Nov 11, 2002, 17:24   #3
Консервативный Демагог
 
VX's Avatar
 
Join Date: Jan 2002
Location: Кавказская Албания
Posts: 889
Rep Power: 7
Reputation: 10
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.
__________________
Праздник к нам приходит...

|^^^^^^^^^'''^\| ||\__
| ВОДКА-ВОДКА | ||','''|'''''''\_____,_
| _..... _ | ||_ _|'__|_____||.........| |
'(@)'(@)'(@)''''''''''''''''''''''*|(@)""""|(@)*
VX is offline   Reply With Quote Quote selected
Old Nov 12, 2002, 02:43   #4
Дошкольник
 
Dark Abyss of Yerevan's Avatar
 
Join Date: Jan 2002
Location: hell
Posts: 124
Rep Power: 7
Reputation: 10
Send a message via ICQ to Dark Abyss of Yerevan
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]
Dark Abyss of Yerevan is offline   Reply With Quote Quote selected
Old Nov 12, 2002, 16:51   #5
 
Posts: n/a
Reputation:
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 Quote selected
Old Nov 12, 2002, 17:06   #6
»
 
z0mbie's Avatar
 
Join Date: Jan 2002
Posts: 776
Rep Power: 7
Reputation: 10
Send a message via ICQ to z0mbie
Post

а во всех image-ах формат текста одинаковый ? например строка "---------------------------------------------------------------" во всех есть ?
z0mbie is offline   Reply With Quote Quote selected
Old Nov 12, 2002, 17:55   #7
 
Posts: n/a
Reputation:
Post

Quote:
Originally posted by z0mbie:
а во всех image-ах формат текста одинаковый ? например строка "---------------------------------------------------------------" во всех есть ?
Да, строка --------------- во всех есть, правда, количество строк текста может различаться, но приблизительно 6-8 строк.
  Reply With Quote Quote selected
Old Nov 12, 2002, 18:42   #8
»
 
z0mbie's Avatar
 
Join Date: Jan 2002
Posts: 776
Rep Power: 7
Reputation: 10
Send a message via ICQ to z0mbie
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);
z0mbie is offline   Reply With Quote Quote selected
Old Nov 12, 2002, 18:42   #9
»
 
z0mbie's Avatar
 
Join Date: Jan 2002
Posts: 776
Rep Power: 7
Reputation: 10
Send a message via ICQ to z0mbie
Post

z0mbie is offline   Reply With Quote Quote selected
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 11:37.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
This board was founded on September 29, 2001
Powered by Viper Internet

Affordable Web Hosting | ParevNet

Buy text link