mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-27 21:24:47 +01:00
Compare commits
No commits in common. "6b2bb96be708ff4dfda19da95990adcdf951cd14" and "2c770d3756b1bad731a731ceb188cf2e6842a1b9" have entirely different histories.
6b2bb96be7
...
2c770d3756
@ -431,7 +431,26 @@ static quint32 readImageInfo(DataStream &stream, Waypoint &waypoint,
|
||||
|
||||
static int speed(quint8 flags)
|
||||
{
|
||||
return ((flags >> 3) & 0x0F) * 10;
|
||||
switch (flags >> 4) {
|
||||
case 0x8:
|
||||
return 40;
|
||||
case 0x9:
|
||||
return 30;
|
||||
case 0xA:
|
||||
return 50;
|
||||
case 0xB:
|
||||
return 70;
|
||||
case 0xC:
|
||||
return 80;
|
||||
case 0xD:
|
||||
return 90;
|
||||
case 0xE:
|
||||
return 100;
|
||||
case 0xF:
|
||||
return 120;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
static quint32 readCamera(DataStream &stream, QVector<Waypoint> &waypoints,
|
||||
@ -635,7 +654,7 @@ static quint32 readSymbol(DataStream &stream, QPixmap &pixmap)
|
||||
ds += paletteSize * 4;
|
||||
}
|
||||
|
||||
if (data.size() >= lineSize * height) {
|
||||
if (imageSize >= lineSize * height) {
|
||||
if (paletteSize) {
|
||||
img = QImage((uchar*)data.data(), width, height, lineSize,
|
||||
QImage::Format_Indexed8);
|
||||
|
Loading…
Reference in New Issue
Block a user