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:
reed@android.com 2010-04-15 14:28:24 +00:00
parent dfee579a8d
commit fd9714e5bd
2 changed files with 6 additions and 3 deletions

View File

@ -73,6 +73,7 @@ else
# these are our registry-based factories
SRC_LIST += src/images/SkImageDecoder_Factory.cpp
SRC_LIST += src/images/SkImageEncoder_Factory.cpp
SRC_LIST += src/images/SkImageDecoder_libpng.cpp
# support files
SRC_LIST += src/images/SkScaledBitmapSampler.cpp
endif

View File

@ -57,9 +57,11 @@ int main (int argc, char * const argv[]) {
SkIntToScalar(w)/2, SkIntToScalar(h)*2/3,
paint);
SkImageEncoder::EncodeFile(path.c_str(), bitmap,
bool success = SkImageEncoder::EncodeFile(path.c_str(), bitmap,
SkImageEncoder::kPNG_Type, 100);
return 0;
if (!success) {
SkDebugf("--- failed to write %s\n", path.c_str());
}
return !success;
}