Binarizer.cpp 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // -*- mode:c++; tab-width:2; indent-tabs-mode:nil; c-basic-offset:2 -*-
  2. /*
  3. * Binarizer.cpp
  4. * zxing
  5. *
  6. * Created by Ralf Kistner on 16/10/2009.
  7. * Copyright 2008 ZXing authors All rights reserved.
  8. * Modified by Lukasz Warchol on 02/02/2010.
  9. *
  10. * Licensed under the Apache License, Version 2.0 (the "License");
  11. * you may not use this file except in compliance with the License.
  12. * You may obtain a copy of the License at
  13. *
  14. * http://www.apache.org/licenses/LICENSE-2.0
  15. *
  16. * Unless required by applicable law or agreed to in writing, software
  17. * distributed under the License is distributed on an "AS IS" BASIS,
  18. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  19. * See the License for the specific language governing permissions and
  20. * limitations under the License.
  21. */
  22. #include <zxing/Binarizer.h>
  23. namespace zxing {
  24. Binarizer::Binarizer(Ref<LuminanceSource> source) : source_(source) {
  25. }
  26. Binarizer::~Binarizer() {
  27. }
  28. Ref<LuminanceSource> Binarizer::getLuminanceSource() const {
  29. return source_;
  30. }
  31. int Binarizer::getWidth() const {
  32. return source_->getWidth();
  33. }
  34. int Binarizer::getHeight() const {
  35. return source_->getHeight();
  36. }
  37. }