summaryrefslogtreecommitdiffstats
path: root/kfile-plugins/bmp
diff options
context:
space:
mode:
Diffstat (limited to 'kfile-plugins/bmp')
-rw-r--r--kfile-plugins/bmp/CMakeLists.txt34
-rw-r--r--kfile-plugins/bmp/Makefile.am22
-rw-r--r--kfile-plugins/bmp/kfile_bmp.cpp174
-rw-r--r--kfile-plugins/bmp/kfile_bmp.desktop66
-rw-r--r--kfile-plugins/bmp/kfile_bmp.h38
5 files changed, 0 insertions, 334 deletions
diff --git a/kfile-plugins/bmp/CMakeLists.txt b/kfile-plugins/bmp/CMakeLists.txt
deleted file mode 100644
index c1c46db6..00000000
--- a/kfile-plugins/bmp/CMakeLists.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-#################################################
-#
-# (C) 2010-2011 Calvin Morrison
-#
-# Improvements and feedback are welcome
-#
-# This file is released under GPL >= 2
-#
-#################################################
-
-include_directories(
- ${CMAKE_CURRENT_BINARY_DIR}
- ${CMAKE_BINARY_DIR}
- ${TDE_INCLUDE_DIR}
- ${TQT_INCLUDE_DIRS}
-)
-
-link_directories(
- ${TQT_LIBRARY_DIRS}
-)
-
-#### other data #################################
-
-install( FILES kfile_bmp.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
-
-
-#### kfile_bmp (module) #########################
-
-tde_add_kpart( kfile_bmp AUTOMOC
- SOURCES kfile_bmp.cpp
- LINK kio-shared
- DESTINATION ${PLUGIN_INSTALL_DIR}
-)
diff --git a/kfile-plugins/bmp/Makefile.am b/kfile-plugins/bmp/Makefile.am
deleted file mode 100644
index dbaa8ff2..00000000
--- a/kfile-plugins/bmp/Makefile.am
+++ /dev/null
@@ -1,22 +0,0 @@
-## Makefile.am for bmp file meta info plugin
-
-# set the include path for X, qt and KDE
-INCLUDES = $(all_includes)
-
-# these are the headers for your project
-noinst_HEADERS = kfile_bmp.h
-
-kde_module_LTLIBRARIES = kfile_bmp.la
-
-kfile_bmp_la_SOURCES = kfile_bmp.cpp
-kfile_bmp_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN)
-kfile_bmp_la_LIBADD = $(LIB_KSYCOCA)
-
-# let automoc handle all of the meta source files (moc)
-METASOURCES = AUTO
-
-messages: rc.cpp
- $(XGETTEXT) kfile_bmp.cpp -o $(podir)/kfile_bmp.pot
-
-services_DATA = kfile_bmp.desktop
-servicesdir = $(kde_servicesdir)
diff --git a/kfile-plugins/bmp/kfile_bmp.cpp b/kfile-plugins/bmp/kfile_bmp.cpp
deleted file mode 100644
index cfda7a16..00000000
--- a/kfile-plugins/bmp/kfile_bmp.cpp
+++ /dev/null
@@ -1,174 +0,0 @@
-/* This file is part of the KDE project
- * Copyright (C) 2002 Shane Wright <[email protected]>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public
- * License as published by the Free Software Foundation version 2.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
- */
-
-#include <config.h>
-#include "kfile_bmp.h"
-
-#include <kprocess.h>
-#include <klocale.h>
-#include <kgenericfactory.h>
-#include <kstringvalidator.h>
-#include <kdebug.h>
-
-#include <tqdict.h>
-#include <tqvalidator.h>
-#include <tqcstring.h>
-#include <tqfile.h>
-#include <tqdatetime.h>
-
-#if !defined(__osf__)
-#include <inttypes.h>
-#else
-typedef unsigned long uint32_t;
-typedef unsigned short uint16_t;
-#endif
-
-typedef KGenericFactory<KBmpPlugin> BmpFactory;
-
-K_EXPORT_COMPONENT_FACTORY(kfile_bmp, BmpFactory( "kfile_bmp" ))
-
-KBmpPlugin::KBmpPlugin(TQObject *parent, const char *name,
- const TQStringList &args)
-
- : KFilePlugin(parent, name, args)
-{
- KFileMimeTypeInfo* info = addMimeTypeInfo( "image/x-bmp" );
-
- KFileMimeTypeInfo::GroupInfo* group = 0L;
-
- group = addGroupInfo(info, "Technical", i18n("Technical Details"));
-
- KFileMimeTypeInfo::ItemInfo* item;
-
- item = addItemInfo(group, "Type", i18n("Type"), TQVariant::String);
-
- item = addItemInfo(group, "Dimensions", i18n("Dimensions"), TQVariant::Size);
- setHint( item, KFileMimeTypeInfo::Size );
- setUnit(item, KFileMimeTypeInfo::Pixels);
-
- item = addItemInfo(group, "BitDepth", i18n("Bit Depth"), TQVariant::Int);
- setUnit(item, KFileMimeTypeInfo::BitsPerPixel);
-
- item = addItemInfo(group, "Compression", i18n("Compression"), TQVariant::String);
-
-}
-
-
-bool KBmpPlugin::readInfo( KFileMetaInfo& info, uint what)
-{
- const char * bmptype_bm = "BM";
- const char * bmptype_ba = "BA";
- const char * bmptype_ci = "CI";
- const char * bmptype_cp = "CP";
- const char * bmptype_ic = "IC";
- const char * bmptype_pt = "PT";
-
- TQFile file(info.path());
-
- if (!file.open(IO_ReadOnly))
- {
- kdDebug(7034) << "Couldn't open " << TQFile::encodeName(info.path()).data() << endl;
- return false;
- }
-
- TQDataStream dstream(&file);
-
- // BMP files are little-endian
- dstream.setByteOrder(TQDataStream::LittleEndian);
-
- // create this now because we output image type early on
- KFileMetaInfoGroup group = appendGroup(info, "Technical");
-
-
- // read the beginning of the file and make sure it looks ok
- unsigned char * bmp_id = (unsigned char *) malloc(2);
- file.readBlock((char *) bmp_id, 2);
-
- if (memcmp(bmp_id, bmptype_bm, 2) == 0) {
- appendItem(group, "Type", i18n("Windows Bitmap"));
- } else if (memcmp(bmp_id, bmptype_ba, 2) == 0) {
- appendItem(group, "Type", i18n("OS/2 Bitmap Array"));
- } else if (memcmp(bmp_id, bmptype_ci, 2) == 0) {
- appendItem(group, "Type", i18n("OS/2 Color Icon"));
- } else if (memcmp(bmp_id, bmptype_cp, 2) == 0) {
- appendItem(group, "Type", i18n("OS/2 Color Pointer"));
- } else if (memcmp(bmp_id, bmptype_ic, 2) == 0) {
- appendItem(group, "Type", i18n("OS/2 Icon"));
- } else if (memcmp(bmp_id, bmptype_pt, 2) == 0) {
- appendItem(group, "Type", i18n("OS/2 Pointer"));
- } else {
- return false;
- }
-
- free(bmp_id);
-
-
- // read the next bits, we ignore them, but anyways...
- uint32_t bmp_size;
- uint16_t bmp_reserved1;
- uint16_t bmp_reserved2;
- uint32_t bmp_offbits;
-
- dstream >> bmp_size;
- dstream >> bmp_reserved1;
- dstream >> bmp_reserved2;
- dstream >> bmp_offbits;
-
-
- // we should now be at the file info structure
- uint32_t bmpi_size;
- uint32_t bmpi_width;
- uint32_t bmpi_height;
- uint16_t bmpi_planes;
- uint16_t bmpi_bitcount;
- uint32_t bmpi_compression;
-
- dstream >> bmpi_size;
- dstream >> bmpi_width;
- dstream >> bmpi_height;
- dstream >> bmpi_planes;
- dstream >> bmpi_bitcount;
- dstream >> bmpi_compression;
-
-
- // output the useful bits
- appendItem(group, "Dimensions", TQSize(bmpi_width, bmpi_height));
- appendItem(group, "BitDepth", bmpi_bitcount);
-
- switch (bmpi_compression) {
- case 0 :
- appendItem(group, "Compression", i18n("None"));
- break;
- case 1 :
- appendItem(group, "Compression", i18n("RLE 8bit/pixel"));
- break;
- case 2 :
- appendItem(group, "Compression", i18n("RLE 4bit/pixel"));
- break;
- case 3 :
- appendItem(group, "Compression", i18n("Bitfields"));
- break;
- default :
- appendItem(group, "Compression", i18n("Unknown"));
- }
-
- return true;
-}
-
-#include "kfile_bmp.moc"
diff --git a/kfile-plugins/bmp/kfile_bmp.desktop b/kfile-plugins/bmp/kfile_bmp.desktop
deleted file mode 100644
index eb66bc53..00000000
--- a/kfile-plugins/bmp/kfile_bmp.desktop
+++ /dev/null
@@ -1,66 +0,0 @@
-[Desktop Entry]
-Type=Service
-Name=BMP Info
-Name[af]=Bmp Inligting
-Name[ar]=معلومات BMP
-Name[br]=Titouroù BMP
-Name[ca]=Informació de BMP
-Name[cs]=BMP info
-Name[cy]=Gwybodaeth BMP
-Name[da]=BMP-info
-Name[de]=BMP-Info
-Name[el]=Πληροφορίες BMP
-Name[eo]=BMP-informo
-Name[es]=Info BMP
-Name[et]=BMP info
-Name[fa]=اطلاعات BMP
-Name[fi]=BMP-tiedot
-Name[fr]=Informations BMP
-Name[ga]=Eolas faoi BMP
-Name[gl]=Inf. BMP
-Name[he]=מידע BMP
-Name[hi]=BMP जानकारी
-Name[hr]=BMP informacije
-Name[hu]=BMP-jellemzők
-Name[is]=BMP upplýsingar
-Name[it]=Informazioni BMP
-Name[ja]=BMP 情報
-Name[kk]=BMP мәліметі
-Name[km]=ព័ត៌មាន BMP
-Name[lt]=BMP informacija
-Name[ms]=Maklumat BMP
-Name[nds]=BMP-Info
-Name[ne]=BMP सूचना
-Name[nl]=BMP-info
-Name[nn]=BMP-info
-Name[nso]=Tshedimoso ya BMP
-Name[pa]=BMP ਜਾਣਕਾਰੀ
-Name[pl]=Informacja o pliku BMP
-Name[pt]=Informação do BMP
-Name[pt_BR]=Informação sobre BMP
-Name[ro]=Informaţii BMP
-Name[ru]=Информация о BMP
-Name[se]=BMP-dieđut
-Name[sl]=Podatki o BMP
-Name[sr]=BMP информације
-Name[sr@Latn]=BMP informacije
-Name[sv]=BMP-information
-Name[ta]=BMP தகவல்
-Name[tg]=Иттилоот оиди BMP
-Name[th]=ข้อมูลแฟ้ม BMP
-Name[tr]=BMP Bilgisi
-Name[uk]=Інформація по BMP
-Name[uz]=BMP haqida maʼlumot
-Name[uz@cyrillic]=BMP ҳақида маълумот
-Name[ven]=Mafhungo BMP
-Name[wa]=Informåcion sol imådje BMP
-Name[xh]=Ulwazi lwe BMP
-Name[zh_CN]=BMP 信息
-Name[zh_HK]=BMP 資訊
-Name[zh_TW]=BMP 資訊
-Name[zu]=Ulwazi lwe-BMP
-ServiceTypes=KFilePlugin
-X-TDE-Library=kfile_bmp
-MimeType=image/x-bmp
-PreferredGroups=Technical
-PreferredItems=Type,Resolution,Bitdepth,Compression
diff --git a/kfile-plugins/bmp/kfile_bmp.h b/kfile-plugins/bmp/kfile_bmp.h
deleted file mode 100644
index b57e725f..00000000
--- a/kfile-plugins/bmp/kfile_bmp.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* This file is part of the KDE project
- * Copyright (C) 2002 Shane Wright <[email protected]>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public
- * License as published by the Free Software Foundation version 2.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef __KFILE_BMP_H__
-#define __KFILE_BMP_H__
-
-#include <kfilemetainfo.h>
-
-class TQStringList;
-
-class KBmpPlugin: public KFilePlugin
-{
- Q_OBJECT
-
-
-public:
- KBmpPlugin( TQObject *parent, const char *name, const TQStringList& args );
-
- virtual bool readInfo( KFileMetaInfo& info, uint what);
-};
-
-#endif