简体   繁体   English

DJVU阅读器从头开始。 C#

[英]DJVU reader from scratch. C#

I want to write your own djvu reader in C #. 我想用C#编写自己的djvu阅读器。 Prompt where to start? 提示从哪里开始?


Program write in C # (Winforms) in Visual Studio. 在Visual Studio中用C#(Winforms)编写程序。 The problem arises in that I do not understand how to read djvu. 出现的问题是我不了解如何阅读djvu。 Or rather take it apart to import each image for further display in the program. 或更确切地说,将其分解以导入每个图像以在程序中进一步显示。

DjVu is an open standard. DjVu是一个开放标准。 There is a C++-based library which reads the format. 有一个基于C ++的库可以读取格式。 You can just copy it if you can open source your code (it's GPL): http://djvu.sourceforge.net/ . 如果您可以开源代码(它是GPL),则可以复制它: http : //djvu.sourceforge.net/

If not, you can start with the specs at http://djvu.org/resources/ and code up your own from scratch. 如果没有,您可以从http://djvu.org/resources/处的规范开始,并从头开始编写自己的规范。

Good luck! 祝好运!

You start with File -> New Project 您从File -> New Project

Stack overflow isn't a "do it for you" site. 堆栈溢出不是“帮您做”的网站。

problem arises in that I do not understand how to read djvu 出现的问题是我不明白如何阅读djvu

You've identified the problem. 您已确定问题所在。 The solution is then to read up on the format and the spec. 解决方案是阅读格式和规格。

I have a C# Djvu reader which is open sourced. 我有一个开源的C#Djvu阅读器。 You can find it here: https://github.com/Telavian/DjvuNet 您可以在这里找到它: https : //github.com/Telavian/DjvuNet

Edit: My library has been taken over by 4creators at: https://github.com/DjvuNet/DjvuNet 编辑:我的图书馆已被4creators接管: https : //github.com/DjvuNet/DjvuNet

Use the FileStream class to read the file. 使用FileStream类读取文件。

Use the Bitmap class (WinForms) or the WriteableBitmap class (WPF) to write pixels. 使用Bitmap类(WinForms)或WriteableBitmap类(WPF)写入像素。

CamiNova, the company that took over development and maintenance of DjVu from LizardTech makes a .NET SDK available. 从LizardTech接管了DjVu的开发和维护的公司CamiNova提供了一个.NET SDK。 I would start there. 我将从这里开始。

https://www.caminova.net/en/downloads/download.aspx?id=17 https://www.caminova.net/en/downloads/download.aspx?id=17

Telavian wrote: 特拉维安写道:

"I have a C# Djvu reader which is open sourced. You can find it here: https://github.com/Telavian/DjvuNet " “我有一个开源的C#Djvu阅读器。您可以在这里找到它: https//github.com/Telavian/DjvuNet

Unfortunately, this project doesn't work fully. 不幸的是,该项目无法充分发挥作用。 Normally the documents having some pages open only. 通常,具有某些页面的文档仅打开。 The one-page documents which don't have PageHeader, don't boot. 没有PageHeader的一页文档,不启动。 Dear Telavian, look please at this moment. 亲爱的特拉维安,此刻请注意。 I could send samples of documents which don't open 我可以发送无法打开的文件样本

sample file 样本文件

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM