mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-23 19:25:54 +01:00
Compare commits
2 Commits
2c770d3756
...
6b2bb96be7
Author | SHA1 | Date | |
---|---|---|---|
6b2bb96be7 | |||
a815bc762f |
@ -431,26 +431,7 @@ static quint32 readImageInfo(DataStream &stream, Waypoint &waypoint,
|
||||
|
||||
static int speed(quint8 flags)
|
||||
{
|
||||
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;
|
||||
}
|
||||
return ((flags >> 3) & 0x0F) * 10;
|
||||
}
|
||||
|
||||
static quint32 readCamera(DataStream &stream, QVector<Waypoint> &waypoints,
|
||||
@ -654,7 +635,7 @@ static quint32 readSymbol(DataStream &stream, QPixmap &pixmap)
|
||||
ds += paletteSize * 4;
|
||||
}
|
||||
|
||||
if (imageSize >= lineSize * height) {
|
||||
if (data.size() >= lineSize * height) {
|
||||
if (paletteSize) {
|
||||
img = QImage((uchar*)data.data(), width, height, lineSize,
|
||||
QImage::Format_Indexed8);
|
||||
|
Loading…
Reference in New Issue
Block a user