Newbie question on images in exist

classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|

Newbie question on images in exist

Osama's Ghost
Hi All,
 
 
I have just started using exist a couple of days back. I am testing it for an inhouse pilot project. Here is a brief description of what I am trying to do
 
 - Create XML files based on a DTD.
 - Store these files in exist - collection /db/lab
 - using an XQuery script to query these files from a web browser to display text on the browser.
 
The problem I have run into is related to images in these xml files. When i embed a image (bmp, gif, svg) in these files, and then perform a query, the text is desiplayed on the browser but the image doesnt appear. A placeholder for that image appears in the browser but not the image.
 
Below is a sample of what I am trying to do -
 
<topic id="testimg">
  <title>Test Image</title>
  <prolog/>
  <body>
    <p>
      <image href="<A href='http://localhost:8080/exist/xmlrpc/db/lab/test.svg"/'>http://localhost:8080/exist/xmlrpc/db/lab/test.svg"/>
    </p>
  </body>
</topic>
 
I have tried different ways with the href attribute here ranging from pointing it to the local disk to pointing it to the database. Nothing seems to be working.
 
I dont understand what is happening here and I couldnt find any documentation regarding this. Could anyone please help me with this?
 
 
I will be extremely grateful for any pointers.
 
Thanks and Regards
Titash
 
 
 


Cherish your visions and your dreams as they are the children of your soul; the blue prints of your ultimate achievements.

(Onericus Criticus - the interpreter of Dreams)


Yahoo! FareChase - Search multiple travel sites in one click.
Reply | Threaded
Open this post in threaded view
|

Re: Newbie question on images in exist

Dannes Wessels
On 10/25/05, Osama's Ghost <[hidden email]> wrote:
>       <image href="http://localhost:8080/exist/xmlrpc/db/lab/test.svg"/>

Try access via the REST interface:
http://localhost:8080/exist/servlet/db/lab/test.svg

be sure that the resource is readable for 'guest', and that this
account has the default password.




--
# Dannes Wessels # The Netherlands #
# Jabber / ICQ / MSN / AIM / Yahoo / google.com/talk #


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Newbie question on images in exist

Manuel Lautenschlager
Does it make sense to store images in the database?
Does eXist keep the images in the memory? What about the performance ?
Which advantages does it have, when you store jpg oder gif into the
database ?

manuel


Dannes Wessels wrote:

> On 10/25/05, Osama's Ghost <[hidden email]> wrote:
>
>>      <image href="http://localhost:8080/exist/xmlrpc/db/lab/test.svg"/>
>
>
> Try access via the REST interface:
> http://localhost:8080/exist/servlet/db/lab/test.svg
>
> be sure that the resource is readable for 'guest', and that this
> account has the default password.
>
>
>
>
> --
> # Dannes Wessels # The Netherlands #
> # Jabber / ICQ / MSN / AIM / Yahoo / google.com/talk #
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by the JBoss Inc.
> Get Certified Today * Register for a JBoss Training Course
> Free Certification Exam for All Training Attendees Through End of 2005
> Visit http://www.jboss.com/services/certification for more information



-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Re: Newbie question on images in exist

Dannes Wessels
Hi,

On 10/25/05, Manuel Lautenschlager <[hidden email]> wrote:
> Does it make sense to store images in the database?

Hmmm, It helps you to keep things together. But storing images in
EXist is probably not the fastest solution, storage on a real
webserver is better for this. But.... Then you don't have all items
together...... Just try, figure out about the performance. It might be
good enough........


> Does eXist keep the images in the memory? What about the performance ?
Don't think so. But parts (cocoon?) may cache this data......  I don;t
know the details on this, sorry.

> Which advantages does it have, when you store jpg oder gif into the
> database ?

The advantage is.... Having all resources (xqueries and static
content) of a project together....

This link may provide you an alternative idea:

http://www.exist-db.org/devguide.html#N1011C

regards

D.


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Re: Newbie question on images in exist

Osama's Ghost
Hi
 
First, sorry for the goof up with the mail id. It was a mistake. My apologies.
 
Second. Dannes - Thanks for your reply. But this doesnt seem to be working :(
 
I tried using the REST interface as directed by you. And (as far as I believe) the resource has guest access too. But it still doesnt work. I am pasting the code below once again
 
<?xml version='1.0' encoding='UTF-8'?>
<topic id="testimg">
  <title>Test Image</title>
  <prolog/>
  <body>
    <p>
      <image href="<A href='http://localhost:8080/exist/servlet/db/lab/test.svg"/'>http://localhost:8080/exist/servlet/db/lab/test.svg"/>
    </p>
  </body>
</topic>
 
To add to my question - if, by any chance, i cannot view images that are inside an exist DB, how do i display files that have images embedded in them?
 
thanks and regards
O C


Dannes Wessels <[hidden email]> wrote:
Hi,

On 10/25/05, Manuel Lautenschlager wrote:
> Does it make sense to store images in the database?

Hmmm, It helps you to keep things together. But storing images in
EXist is probably not the fastest solution, storage on a real
webserver is better for this. But.... Then you don't have all items
together...... Just try, figure out about the performance. It might be
good enough........


> Does eXist keep the images in the memory? What about the performance ?
Don't think so. But parts (cocoon?) may cache this data...... I don;t
know the details on this, sorry.

> Which advantages does it have, when you store jpg oder gif into the
> database ?

The advantage is.... Having all resources (xqueries and static
content) of a project together....

This link may provide you an alternative idea:

http://www.exist-db.org/devguide.html#N1011C

regards

D.


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open


Cherish your visions and your dreams as they are the children of your soul; the blue prints of your ultimate achievements.

(Onericus Criticus - the interpreter of Dreams)


Yahoo! FareChase - Search multiple travel sites in one click.
Reply | Threaded
Open this post in threaded view
|

Re: Re: Newbie question on images in exist

Michael Beddow-2
I think there are two aspects to this. Dannes has shown you how to make the
uri for the image into one that would (other things being equal) allow the
image concerned to be retrieved via the REST interface. That's the part of
your problem that's eXist specific.

But (as your references to trying to point the href elsewhere, including to
your local drive, indicate) the other part of your problem seems to be that
you are expecting your browser to do something it isn't designed to do. Even
if the href bears a uri that would retrieve the image, what you appear to
want isn't going to happen with a standard browser if your documents are xml
according to a DTD of your own devising and are delivered as such (i.e. with
mime-type text/xml). Unless maybe you are planning to rely on the fact that
if you serve up a file of the kind you present as html, most browsers will
have a shot at rendering what they can, including fetching the image here.
But that's not a very promising approach. OTOH if you made your master
documents valid xhtml, then with the right uri you would find the images
appear as you wish.

Michael Beddow




-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Re: Newbie question on images in exist

Pierrick Brihaye-2
In reply to this post by Osama's Ghost
Hi,

OC wrote:

> To add to my question - if, by any chance, i cannot view images that are
> inside an exist DB, how do i display files that have images embedded in
> them?

By using a URL that actually returns bytes from an image file *as well
as* a relevant MIME type.

[huge snip]

Cheers,

--
Pierrick Brihaye, informaticien
Service régional de l'Inventaire
DRAC Bretagne
mailto:[hidden email]
+33 (0)2 99 29 67 78
http://usenet-fr.news.eu.org/fr-chartes/rfc1855.html. L'avez-vous lu ?


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Re: Newbie question on images in exist

wolfgangmm
Hi,

> > To add to my question - if, by any chance, i cannot view images that are
> > inside an exist DB, how do i display files that have images embedded in
> > them?
>
> By using a URL that actually returns bytes from an image file *as well
> as* a relevant MIME type.

If you browse directly to
http://localhost:8080/exist/servlet/db/lab/test.svg, you should be
able to see the image - assuming that your browser has an svg plugin
installed.

The only problem here could be that eXist returns "text/xml" as
mimetype in the HTTP header, not "image/svg+xml". I'm currently
checking this...

Concerning the pros and cons of storing images in the db: an image is
stored in the database as a blob, i.e. a raw sequence of pages with
binary content. Retrieving image data should thus be fast. I recently
stored a large amount of images (150mb) in the db for one of my
applications, and I could not really observe a difference in
performance compared to filesystem storage.

As has already been mentioned by others, storing images in the db has
advantages if you want your whole application to reside within the db.
In my recent applications, most web pages are generated through XQuery
scripts, so images will be resolved relative to the location of the
XQuery. To avoid problems when moving images around, I use an xml file
which maps an image id to the path to the corresponding image.

Wolfgang


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Re: Newbie question on images in exist

Osama's Ghost
Hi,
 
Thanks for the replies. Please see inline.
 
>>If you browse directly to http://localhost:8080/exist/servlet/db/lab/test.svg, you should be
>> able to see the image - assuming that your browser has an svg plugin installed.
Yes, I can view the svg file if i access this url through the browser. However, I cannot see files of any other format - gif/jpg (that are stored at the same location in the DB). Does exist have a format restriction for images?
 
>> The only problem here could be that eXist returns "text/xml" as  mimetype in the HTTP >>header, not "image/svg+xml". I'm currently checking this...
 
Is there a way i can work around this for the moment as a temporary measure?
 
 
Thanks and Regards
OC
 


Wolfgang Meier <[hidden email]> wrote:
Hi,

> > To add to my question - if, by any chance, i cannot view images that are
> > inside an exist DB, how do i display files that have images embedded in
> > them?
>
> By using a URL that actually returns bytes from an image file *as well
> as* a relevant MIME type.

If you browse directly to
http://localhost:8080/exist/servlet/db/lab/test.svg, you should be
able to see the image - assuming that your browser has an svg plugin
installed.

The only problem here could be that eXist returns "text/xml" as
mimetype in the HTTP header, not "image/svg+xml". I'm currently
checking this...

Concerning the pros and cons of storing images in the db: an image is
stored in the database as a blob, i.e. a raw sequence of pages with
binary content. Retrieving image data should thus be fast. I recently
stored a large amount of images (150mb) in the db for one of my
applications, and I could not really observe a difference in
performance compared to filesystem storage.

As has already been mentioned by others, storing images in the db has
advantages if you want your whole application to reside within the db.
In my recent applications, most web pages are generated through XQuery
scripts, so images will be resolved relative to the location of the
XQuery. To avoid problems when moving images around, I use an xml file
which maps an image id to the path to the corresponding image.

Wolfgang


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open


Cherish your visions and your dreams as they are the children of your soul; the blue prints of your ultimate achievements.

(Onericus Criticus - the interpreter of Dreams)


Yahoo! FareChase - Search multiple travel sites in one click.
Reply | Threaded
Open this post in threaded view
|

Re: Newbie question on images in exist

Manuel Lautenschlager
In reply to this post by Dannes Wessels
Dannes Wessels wrote:

> Hi,
>
> On 10/25/05, Manuel Lautenschlager <[hidden email]> wrote:
>
>>Does it make sense to store images in the database?
>
>
> Hmmm, It helps you to keep things together. But storing images in
> EXist is probably not the fastest solution, storage on a real
> webserver is better for this. But.... Then you don't have all items
> together...... Just try, figure out about the performance. It might be
> good enough........
>
That "keep together" is an argument,
I think both have advantages and disadvantages:
pro:
keep together
easier backup und sync
webdav upload
contra:
no ftp upload
no webdav updload on osx - no drap&drop
performance
limits ?

probably it depends on what you are using it for.

manuel



-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Re: Newbie question on images in exist

Michael Beddow-2
In reply to this post by Osama's Ghost
One small clarification. SVG images surely aren't stored as BLOBs, since
they are well-formed XML? mime-types.conf correctly specifies they should be
stored as (exist) type "xml" with mime-type "svg+xml"

As for the reported problem with gifs etc. If, as seems to be the case,
eXist is returning SVGs with the xml-generic "text/xml" mime-type instead of
the one specified in mime-types.xml, it may well also be returning gifs and
jpegs with "application/octet-stream" instead of the correct specific
mime-type. So maybe two symptoms of one underlying mime-typing bug?

Michael Beddow




-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Re: Newbie question on images in exist

wolfgangmm
On 10/25/05, Michael Beddow <[hidden email]> wrote:
> One small clarification. SVG images surely aren't stored as BLOBs, since
> they are well-formed XML?  mime-types.conf correctly specifies they should
> be stored as (exist) type "xml" with mime-type "svg+xml"

Yes, SVG images are stored as xml. I also confirmed that the CVS
version returns the correct mime-type "svg+xml". The 0805 snapshot
just returned "text/xml".

For all binary images, the mime-type should be correct as well. I had
no problems with gif, jpeg or png. They all show the appropriate
mime-type. The only problem I observed was with upper-case file
suffixes on windows: the mime table just compares the lower-case
suffixes, so img.GIF is not recognized as a gif image. This is fixed
now.

Anyway, you can check the mime-type settings with the Java client.
Select the resource, then click on the toolbar icon "Edit
owners/permissions...". The stored mime-type is shown in the dialog.

Wolfgang


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Re: Newbie question on images in exist

Daniel E. Renfer
Wolfgang Meier wrote:

> On 10/25/05, Michael Beddow <[hidden email]> wrote:
>  
>> One small clarification. SVG images surely aren't stored as BLOBs, since
>> they are well-formed XML?  mime-types.conf correctly specifies they should
>> be stored as (exist) type "xml" with mime-type "svg+xml"
>>    
>
> Yes, SVG images are stored as xml. I also confirmed that the CVS
> version returns the correct mime-type "svg+xml". The 0805 snapshot
> just returned "text/xml".
>
> For all binary images, the mime-type should be correct as well. I had
> no problems with gif, jpeg or png. They all show the appropriate
> mime-type. The only problem I observed was with upper-case file
> suffixes on windows: the mime table just compares the lower-case
> suffixes, so img.GIF is not recognized as a gif image. This is fixed
> now.
>
> Anyway, you can check the mime-type settings with the Java client.
> Select the resource, then click on the toolbar icon "Edit
> owners/permissions...". The stored mime-type is shown in the dialog.
>
> Wolfgang
>  

I'm pretty sure that eXist doesn't have this yet, but I think it would
be really handy if we could access the internal EXIF metadata of a jpeg
image. I just did a quick google, and it looks like there are already a
few Java libraries that let you read EXIF data, but I'm not quite sure
how well they would work within eXist. What I'd like to see is a
built-in function that accepts the location of a jpeg image, and returns
an xml document that has a root node. ("exif") and a list of child nodes
with the name of each value being the name of the exif property (spaces
converted to underscore) and the content being the value. It would be
really handy to be able to use an XQuery expression to search all of
your images for all pictures taken with a specific camera, or pictures
taken on a certain day at a certain resolution.

We would want eXist to be properly caching and indexing all of this
data. (if the image is in the db) The more tightly integrated the
better. I'd love it if you didn't even have to make a seperate function
call to get down to the metadata, but that could possibly cause problems
with some people.

Daniel E. Renfer (http://kronkltd.net/)


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Re: Newbie question on images in exist

Jakob Fix-2
Hello Anas,

On 25/10/05, Anas M. Nebuchadnezzar XXXVII <[hidden email]> wrote:

> Wolfgang Meier wrote:
> > On 10/25/05, Michael Beddow <[hidden email]> wrote:
> >
> >> One small clarification. SVG images surely aren't stored as BLOBs, since
> >> they are well-formed XML?  mime-types.conf correctly specifies they should
> >> be stored as (exist) type "xml" with mime-type "svg+xml"
> >>
> >
> > Yes, SVG images are stored as xml. I also confirmed that the CVS
> > version returns the correct mime-type "svg+xml". The 0805 snapshot
> > just returned "text/xml".
> >
> > For all binary images, the mime-type should be correct as well. I had
> > no problems with gif, jpeg or png. They all show the appropriate
> > mime-type. The only problem I observed was with upper-case file
> > suffixes on windows: the mime table just compares the lower-case
> > suffixes, so img.GIF is not recognized as a gif image. This is fixed
> > now.
> >
> > Anyway, you can check the mime-type settings with the Java client.
> > Select the resource, then click on the toolbar icon "Edit
> > owners/permissions...". The stored mime-type is shown in the dialog.
> >
> > Wolfgang
> >
>
> I'm pretty sure that eXist doesn't have this yet, but I think it would
> be really handy if we could access the internal EXIF metadata of a jpeg
> image. I just did a quick google, and it looks like there are already a
> few Java libraries that let you read EXIF data, but I'm not quite sure
> how well they would work within eXist. What I'd like to see is a
> built-in function that accepts the location of a jpeg image, and returns
> an xml document that has a root node. ("exif") and a list of child nodes
> with the name of each value being the name of the exif property (spaces
> converted to underscore) and the content being the value. It would be
> really handy to be able to use an XQuery expression to search all of
> your images for all pictures taken with a specific camera, or pictures
> taken on a certain day at a certain resolution.

Maybe I'm overreacting here, but I think one should be careful about
adding features that are not really in the realm of what Exist is, a
general-purpose XML database.

Adding functionality like the one you describe (and which can be
useful indeed, but only for certain given applications) should be done
as plugins or extensions for Exist.

Beware of feature bloat!

--
cheers,
Jakob.


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Newbie question on images in exist

Emilien Taque
In reply to this post by Manuel Lautenschlager
Hi,
It seems to be a third solution, but I'm a newbie so it may be stupide :P
What about storing serialized images in an XML tag, and then storing that XML
data in the database ?



-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Re: Newbie question on images in exist

Michael Beddow-2
Emilien Taque wrote

> It seems to be a third solution, but I'm a newbie so it may be stupide :P
> What about storing serialized images in an XML tag, and then storing that
XML
> data in the database ?
>

It's far from stupid: indeed it's the only way that such items can be stored
"in XML" in the strict sense of the word, rather than stored "alongside" XML
in a kind of binary annexe. Encoding binary data in BASE64 is the only way
the designers of the XML spec provided for embedding such data within the
body of an XML document instance. It's the way Microsoft currently embeds
images and other binary material in its Office 2003 XML format (although
they don't quite get it right where EOL characters are concerned, and it
looks as though for Office 12 they are shifting to the OO approach of a
bundle of associated zips and thus avoiding BASE64 bloat). And since the
original poster talked about "embedding" the image in the document (though I
suspect what was really meant was embedding the image in the rendered
version of the document visible in the client, which is conceptually and
practically very different) what you suggest is the only way to carry out
that aim in the literal sense.

The snag, of course, is the space and efficiency penalty. BASE64 encoded
data takes up a lot more space than its binary source, and the burden of
decoding it would fall on the client after the document had been retrieved.

Michael Beddow



-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Re: Newbie question on images in exist

wolfgangmm
In reply to this post by wolfgangmm
Hi,

sorry for the confusion. Like most people that answered to your
question, I have been referring to the current development builds of
eXist. The 1.0beta2 build is really outdated, and carries a health
warning. Especially, storing binary files in the database has improved
a lot since the last stable release one year ago. So please update to
a recent development snapshot, which should - apart from documenation
issues - be quite stable. I'm currently uploading a new snapshot and I
suggest you get that once it is available on sourceforge.

With the snapshot, your images should get the correct mime-type
assigned. When retrieving an image from the database, the mime-type
declared in the HTTP header is important because your browser uses it
to determine how it should display the data. So if your resources are
stored with the correct mime-type (should be ok for all the common
image types), you should not experience any more problems.

Wolfgang


> Hi Wolfgang,
>
> Sorry to bother you again, but at the end of this discussion I got more
> confused and i am still where I was with my problem. I am not very sure how
> I am supposed to handle this issue
>
> I am now clear that we can store images and retireve them from exist. But
> the steps are still not clear.
>
> - As one of the user suggested, do I need to handle this issue at two levels
> - provide the correct uri for the image and figure out how to handle the
> image at the browsers end?
>
> - I am not sure about the MIME type settings and how to handle that part.
>
> >> you can check the mime-type settings with the Java client.
> Select the resource, then click on the toolbar icon "Edit
> owners/permissions...".
>
> - I tried this but I dont see the MIME settings for my resources. I can
> access my svg file from the browser, but I get an error with gif files.
>
> I am sorry that this sounds so mixed. But please help me out on this.
>
> Thanks and Regards
> OC
>
> P.S. - I am using the beta 2 1107 build


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Re: Newbie question on images in exist

Pierrick Brihaye-2
In reply to this post by Daniel E. Renfer
Hi,

Anas M. Nebuchadnezzar XXXVII wrote:

[snipped 25 lines]

> I'm pretty sure that eXist doesn't have this yet, but I think it would
> be really handy if we could access the internal EXIF metadata of a jpeg
> image.

Yes !

> I just did a quick google, and it looks like there are already a
> few Java libraries that let you read EXIF data, but I'm not quite sure
> how well they would work within eXist.

I think this could be achieved as such :

1) an EXIF library
2) an EXIF dedicated module (eXist welcomes contributed modules, see
http://cvs.sourceforge.net/viewcvs.py/exist/eXist-1.0/extensions/)
3) ideally, triggers for binary documents, which are still to be developed.

> We would want eXist to be properly caching and indexing all of this
> data. (if the image is in the db) The more tightly integrated the
> better. I'd love it if you didn't even have to make a seperate function
> call to get down to the metadata, but that could possibly cause problems
> with some people.

It shouldn't since the logic you describe should be at the application
level :-)

Cheers,

--
Pierrick Brihaye, informaticien
Service régional de l'Inventaire
DRAC Bretagne
mailto:[hidden email]
+33 (0)2 99 29 67 78
http://usenet-fr.news.eu.org/fr-chartes/rfc1855.html. L'avez-vous lu ?


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open