Code Duplication    Length = 19-19 lines in 2 locations

htdocs/modules/system/class/thumbs/phpthumb.gif.php 2 locations

@@ 67-85 (lines=19) @@
64
65
///////////////////////////////////////////////////////////////////////////////////////////////////
66
67
function gif_outputAsBmp($gif, $lpszFileName, $bgColor = -1)
68
{
69
	if (!isSet($gif) || (@get_class($gif) <> 'cgif') || !$gif->loaded() || ($lpszFileName == '')) {
70
		return false;
71
	}
72
73
	$fd = $gif->getBmp($bgColor);
74
	if (strlen($fd) <= 0) {
75
		return false;
76
	}
77
78
	if (!($fh = @fopen($lpszFileName, 'wb'))) {
79
		return false;
80
	}
81
	@fwrite($fh, $fd, strlen($fd));
82
	@fflush($fh);
83
	@fclose($fh);
84
	return true;
85
}
86
87
///////////////////////////////////////////////////////////////////////////////////////////////////
88
@@ 89-107 (lines=19) @@
86
87
///////////////////////////////////////////////////////////////////////////////////////////////////
88
89
function gif_outputAsPng($gif, $lpszFileName, $bgColor = -1)
90
{
91
	if (!isSet($gif) || (@get_class($gif) <> 'cgif') || !$gif->loaded() || ($lpszFileName == '')) {
92
		return false;
93
	}
94
95
	$fd = $gif->getPng($bgColor);
96
	if (strlen($fd) <= 0) {
97
		return false;
98
	}
99
100
	if (!($fh = @fopen($lpszFileName, 'wb'))) {
101
		return false;
102
	}
103
	@fwrite($fh, $fd, strlen($fd));
104
	@fflush($fh);
105
	@fclose($fh);
106
	return true;
107
}
108
109
///////////////////////////////////////////////////////////////////////////////////////////////////
110