Displaying image scanned Quran?

21 views
Skip to first unread message

TarekEldeeb

unread,
May 29, 2009, 4:58:29 PM5/29/09
to zekr
Salamo alaykom brothers and sisters,

I would like to ask, did the developers on this group consider
displaying the quran as scanned images of a real quran? People who
study the quran always need to SEE the pages as is. Simple Newlined
text is disturbing, even if the font looks close to the real.

I have a fully scanned version which is less than 18 MB when
compressed. Maybe this can be an optional extra add-on for Zekr, but
shall be associated with some indexing for proper display.

Did someone discuss this point? What prevented this idea to be
developed?

Thanks in advance,

Tarek

Abu Adam

unread,
Jun 1, 2009, 8:21:32 AM6/1/09
to zekr
wa alaikum assalam
how good quality is the scan you have

is it better than this one?
http://alpha.searchquran.net/quran/114

Mohsen Saboorian

unread,
Jun 1, 2009, 9:03:34 AM6/1/09
to ze...@googlegroups.com
Salaam,

Tarek, please open a feature request on sf.net:

We already have requests for this one, but no work done yet on the subject.

Abdullah, the quality is very good. Thanks for mentioning this one. Can I download all the images in one archive, instead of surfing for more that 6000 files?

Regards,
Mohsen.

ahmedre

unread,
Jun 1, 2009, 2:56:12 PM6/1/09
to ze...@googlegroups.com, Nour Sharabash
salams -
the images on alpha.searchquran.net are generated from QuranComplex's
(using a combination of their webpages, fonts, and gd). we put our
code up to generate these (both in php and perl) on github here -
http://github.com/quran/quran_images/tree/master.

i would suggest waiting if you can for a little bit because we are in
the process of:
1. validating the images
2. fixing the images a little bit - some images have white space at
the beginning, for example.

if you want to download the images ready made, i can provide you a zip
with all of them (or you can write a script to do it - sura_ayah.png
without any 0-padding), but again, i suggest you wait a little bit
insha'Allah :)

if you have any questions or suggestion, feel free.
wsalams,
-ahmed
--
http://whatstheplot.com/blog

TarekEldeeb

unread,
Jun 2, 2009, 6:47:19 AM6/2/09
to zekr
No sir, I meant scanned from Al-madina's Quran.

Like this one: (without the page background shadow effect)
www.quranflash.com

What do you think ?

On Jun 1, 3:21 pm, Abu Adam <abdullah.abu.a...@gmail.com> wrote:
> wa alaikum assalam
> how good quality is the scan you have
>
> is it better than this one?http://alpha.searchquran.net/quran/114

Abu Adam

unread,
Jun 2, 2009, 10:35:14 AM6/2/09
to zekr
Unfortunately that one on FlashQuran is far too low quality and its
not open source either.
I am willing to commit some funds on behalf of VerseByVerseQuran.com
to get this done if we can find someone reliable to do a good job on
it

ahmedre

unread,
Jun 2, 2009, 4:14:08 PM6/2/09
to ze...@googlegroups.com, Nour Sharabash
actually brother, these *are* the madinah script - however, because we
outputted them as individual images (rather than as an entire page),
you can't tell (because if an ayah starts in the middle of the line,
we bring it to the beginning of the line, etc -- we also specify a
custom width for the images and a custom font size which affects how
the output is).

if you look at the QuranComplex font, you'll see that it is really 604
fonts, one per page, and each glyph is really a word. so to render
any ayah on page 1, you use font 1, and so on.

so if we wanted to modify that script to output an entire page to look
exactly like madini mus7af (meaning the same start and end of each
line, page, etc match perfectly) - that is extremely easy to do.

here is an example:
http://whatstheplot.com/images/dayn_06.02.09.png

this solution can be adapted to reach what you guys are looking for.
wsalams,
-ahmed
--
http://whatstheplot.com/blog

TarekEldeeb

unread,
Jun 3, 2009, 4:48:34 AM6/3/09
to zekr
This is exactly what I meant !!

Can this be a display mode in Zekr?
Maybe the current aya be highlighted or bolded.

But I ensure the high importance of SEEing the actual whole pages of
the quran (as in Madina's).

Jazakom Allaho khairan

TarekEldeeb

unread,
Jun 3, 2009, 4:49:51 AM6/3/09
to zekr
This is exactly what I meant !!

Can this be a display mode in Zekr?
Maybe the current aya be highlighted or bolded.

But I ensure the high importance of SEEing the actual whole pages of
the quran (as in Madina's).

Jazakom Allaho khairan

On Jun 2, 11:14 pm, ahmedre <ahme...@gmail.com> wrote:

Mohsen Saboorian

unread,
Jun 3, 2009, 1:56:58 PM6/3/09
to ze...@googlegroups.com
Salaam,

This would not be hard to implement. You can do this by simply writing your own theme (basically change page-item.vm), or change the current one. Wherever there is $AYA0.Text (or $A.Text), replace it with something like this:

<img src="path/to/image/${SURA_NUM}_${AYA_NUM}.png" />

Regards,
Mohsen.

TarekEldeeb

unread,
Jun 4, 2009, 6:01:58 PM6/4/09
to zekr
salamo alaykom,

I apologize for the duplicated post before.

@ahmedre
can you provide me with those page pictures? or a script to generate
them?

@mohsen
Is there a method like:
getPageNumber(${SURA_NUM}, ${AYA_NUM})
Or should I implement it?

As I previously mentioned, all aya pictures from github.com are right-
aligned. They do not look like Al-Madina's when rendered. To those who
study quran, it is very important to always SEE the same position and
font when reading Quran, this stabilizes Quran in their hearts.

Jazakom Allaho khayran

Mohsen Saboorian

unread,
Jun 6, 2009, 4:53:35 PM6/6/09
to ze...@googlegroups.com
Salaam,

On Fri, Jun 5, 2009 at 1:31 AM, TarekEldeeb <tarek...@gmail.com> wrote:
>
> salamo alaykom,
>
> I apologize for the duplicated post before.
>
> @ahmedre
> can you provide me with those page pictures? or a script to generate
> them?
>
> @mohsen
> Is there a method like:
>   getPageNumber(${SURA_NUM}, ${AYA_NUM})
> Or should I implement it?

Yes there is. There is a method
AbstractQuranPagingData#getContainerPage(IQuranLocation) which returns
an IQuranPage. IQuranPage then has a getPageNum() method, which is
actually what you want. BTW, if you want to use Uthmani script, you
should use CustomPagingData (which extends AbstractQuranPagingData) as
your default paging scheme, and choose Uthmani paging.

In order to obtain default paging scheme:
ApplicationConfig.getInstance().getQuranPaging().getDefault().

There is however a more simple way. If you are using Uthmani paging
scheme, simply use ${PAGE_NUM} in .vm file which renders current page,
and can be used to load an image file.

Qadri

unread,
Jun 26, 2009, 11:04:47 AM6/26/09
to zekr
Salaam

Ahmed, Is it possible to do a string of ayahs with this script? It
looks to me as though it only handles one surah, ayah pair at a time,
and so I can't achieve a book-like effect for, say, Surat an-nas, or
the beginning of Surat al-baqarah. I don't know if you're already
working on this, but if you aren't, I had a few ideas about it.

My first ditch attempt would be to create a separate script to adjust
the size for the ayahs after the first, depending on where the last
one ended off. However, that would be problematic because the entire
next ayah would then be offset to the left. So, a combination of that
plus having the ability to apply an offset for the first line would
make it possible to create a page effect for whole surahs. If you /
your group is too busy, I can try and figure out the perl and the GD
library, just let me know.

Ali.

ahmedre

unread,
Jun 26, 2009, 3:35:02 PM6/26/09
to ze...@googlegroups.com
wa3laikum alsalam,
currently, am working on a script to generate the "madani page" (using
the same exact format as the madani mushaf) - i am guessing that some
subset of this code can be useful for taking a string of ayahs and
displaying them as you mentioned.

if we assume consecutive verses (like you're never going to run the
script saying "give me an image with 1:1 and 2:1 in the same image),
then we just have to handle the case in which the first (and/or last)
lines are not complete - so if either of these start (or end) in the
middle of a line (rather than at the very beginning or very end) we'll
have to offset it or center it.

the rest of the lines (the ones in the middle) can just be displayed
like the normal madani text.

after finishing the madani page, i can try to work on this, but if you
would like to, feel free to give it a shot too insha'Allah.

wsalams,
-ahmed
--
http://whatstheplot.com/blog
Reply all
Reply to author
Forward
0 new messages