[Logo] Mango Community
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
flipbook not loading images, image type 1 for jpg not loaded from database  XML
Forum Index » Development general discussion
Author Message
craig

Initiate

Joined: 06/08/2007 16:50:46
Messages: 163
Offline

Retrieving images from the database seems to be broken in 1.12.4.

The query returns:

select pv.dataType, pv.pointValue, pva.textPointValueShort, pva.textPointValueLong, pv.ts, pva.sourceType, pva.sourceId from pointValues pv left join pointValueAnnotations pva on pv.id = pva.pointValueId where pv.id=9467

DATATYPE: 5
POINTVALUE: 1
TEXTPOINTVALUESHORT: 9467
TEXTPOINTVALUELONG: null
TS: 1342218110819
SOURCETYPE: null
SOURCEID: null



The new ImageValue constructor uses the textpointvalueshort of 9467 to determine the filename, and the pointvalue 1 to determine the file extension.

Therefore in PointValueDao.java


should be



changing the column used to load the image type from the fourth column to the 2nd gives the image the correct type (1 for jpg) and subsequently the correct file extension is used when loading images for the flipbook, otherwise "img9467." is loaded by the imageValueServlet, which doesn't exist, and 0 byte images are returned result.
mlohbihler

Master
[Avatar]

Joined: 01/03/2007 22:48:52
Messages: 1847
Offline

Yes, this is the correct fix. It already made it into 1.13.x, but didn't make it back into 1.12.x.

Best regards,
Matthew Lohbihler
 
Forum Index » Development general discussion
Go to:   
Powered by JForum 2.1.9 © JForum Team