
$rgb = $this->html2rgb($color); // Rotate the image $rotated_image = imagerotate($this->image, $degree, imagecolorallocate($this->image, $rgb[0], $rgb[1], $rgb[2])); // If the image was rotated by 90 or 270 degrees, we need to swap width and height if ($degree == 90 || $degree == 270) { $this->image = imagescale($rotated_image, $this->height, $this->width); // Swap width and height $this->width = imagesx($this->image); $this->height = imagesy($this->image); } else { // If not rotated by 90 or 270 degrees, keep the original width and height $this->image = $rotated_image; $this->width = imagesx($this->image); $this->height = imagesy($this->image); } // Free the memory used by the rotated image imagedestroy($rotated_image);
Car Weight: 820
Rounded Weight: 800
EU Target: 111
CO2-päästöluokat | EU-tavoite | CO2-päästöt |
---|---|---|
< 101
A
|
||
101-120
B
|
111 g/km
|
|
121-130
C
|
125 g/km
|
|
131-150
D
|
||
151-175
E
|
||
176-200
F
|
||
> 200
G
|