add png to makefile for linux
git-svn-id: http://skia.googlecode.com/svn/trunk@551 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
dfee579a8d
commit
fd9714e5bd
1
Makefile
1
Makefile
@ -73,6 +73,7 @@ else
|
|||||||
# these are our registry-based factories
|
# these are our registry-based factories
|
||||||
SRC_LIST += src/images/SkImageDecoder_Factory.cpp
|
SRC_LIST += src/images/SkImageDecoder_Factory.cpp
|
||||||
SRC_LIST += src/images/SkImageEncoder_Factory.cpp
|
SRC_LIST += src/images/SkImageEncoder_Factory.cpp
|
||||||
|
SRC_LIST += src/images/SkImageDecoder_libpng.cpp
|
||||||
# support files
|
# support files
|
||||||
SRC_LIST += src/images/SkScaledBitmapSampler.cpp
|
SRC_LIST += src/images/SkScaledBitmapSampler.cpp
|
||||||
endif
|
endif
|
||||||
|
@ -57,9 +57,11 @@ int main (int argc, char * const argv[]) {
|
|||||||
SkIntToScalar(w)/2, SkIntToScalar(h)*2/3,
|
SkIntToScalar(w)/2, SkIntToScalar(h)*2/3,
|
||||||
paint);
|
paint);
|
||||||
|
|
||||||
SkImageEncoder::EncodeFile(path.c_str(), bitmap,
|
bool success = SkImageEncoder::EncodeFile(path.c_str(), bitmap,
|
||||||
SkImageEncoder::kPNG_Type, 100);
|
SkImageEncoder::kPNG_Type, 100);
|
||||||
|
if (!success) {
|
||||||
return 0;
|
SkDebugf("--- failed to write %s\n", path.c_str());
|
||||||
|
}
|
||||||
|
return !success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user