Source language: Translate to:

Bugs with images in the internal RTF editor

General questions about NeoBook

Moderator: Neosoft Support

Bugs with images in the internal RTF editor

Postby Enigman » Sun May 31, 2015 10:27 am

This is primarily a bug report for Dave, but if anyone has discovered workarounds I'd love to hear them.

I have an application nearing completion that is using RTF files for the help system. The RTFs are compiled into the program and referenced from help buttons on the interface. I have run into what can only be described as "bugs" with the internal text/RTF editor inside Neobook.

When I first created the RTF help files I used WordPad to make the files and embed the images. This worked fine except that WordPad makes the most hideous RTF code you have ever seen, and often when those files are displayed in a NB application, they are unstable and tend to have "wonky" display glitches. I discovered that if I edit the RTF files in the internal editor inside NeoBook, then the display of the file is stable. BUT ... and this is a big but ... the NB editor handles images in a much different way than WordPad.

Here are the main problems with the internal NB editor:

1) If I add an image in the NB editor using the "Insert image file..." menu option, then the image comes into the file scaled to 92% instead of 100%. The editor does the scaling by omitting pixel lines from the image. This essentially destroys the image with no recoverability. There is no way to drag the image handles and restore the image resolution because the lines are gone from the image. Worse yet, the corner handles do not drag the image size proportionally. Instead they drag the image size as if the image was square and not rectangular so any movement of the handle wipes out the aspect ratio of the image. Also images are limited to the BMP format as an input file, although I understand what a pain it would be to write the image interpretter for all input types. I can live with the BMP limitation if the image would just scale properly.

2) If I add an image to the file by pasting it in from the clipboard, I can use any input format as the source to copy, but the image comes in scaled to 75%. The rest of the problems in (1) above also apply to pasted images.

3) The internal editor stores images in the RTF by converting them to text encoding. Apparently the encoding is not in a standard format. If I open the RTF in WordPad again after having saved it previoously in the internal NB editor, then WordPad does not understand the images and deletes them from the file or ignores them. Since I cannot add 100% scale images in the NB editor I am forced to add them in WordPad which does add them at 100%, but each time I update the file images I must re-add ALL of them. My files can be complex and this is frankly a real pain.

Dave, I know you are busy with the new app builder, but if you have any time to look at the image adding function it may be something simple that is telling the images to scale, or a glitch in the image interpretter. Any fix for this would allow me and others to use the internal editor exclusively instead of bouncing back and forth with wordPad.

Thanks for your consideration. :D
User avatar
Enigman
 
Posts: 314
Joined: Tue Apr 12, 2005 3:57 pm
Location: Foothill Ranch, CA

Re: Bugs with images in the internal RTF editor

Postby Wrangler » Mon Jun 01, 2015 7:55 am

Are the images you are using in .bmp format?
Wrangler
--------------
"You never know about a woman. Whether she'll laugh, cry or go for a gun." - Louis L'Amour

Windows 7 Ultimate SP1 64bit
16GB Ram
Asus GTX 950 OC Strix
Software made with NeoBook
http://highdesertsoftware.com
User avatar
Wrangler
 
Posts: 1507
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA

Re: Bugs with images in the internal RTF editor

Postby Enigman » Mon Jun 01, 2015 8:04 am

Wrangler wrote:Are the images you are using in .bmp format?

When I insert an image from the NB editor, then yes, the file is BMP. That is the only format the NB editor will load.

When I insert an image in WordPad then I can use any image format. Opening a WordPad created RTF in the NB editor is not a problem. The images retain their scale and quality. The scaling problem only occurs when adding an image in the NB editor and the input file doesn't matter. I can start with a new blank file and add an image and the scaling problem occurs.
User avatar
Enigman
 
Posts: 314
Joined: Tue Apr 12, 2005 3:57 pm
Location: Foothill Ranch, CA

Re: Bugs with images in the internal RTF editor

Postby Neosoft Support » Mon Jun 01, 2015 10:12 am

This may sound strange, but I'm having trouble reproducing this problem here. When I insert or paste a BMP image into NeoBook's editor, it appears exactly the same size (100%) as the original. I even compared a screen capture from the editor to the original image and they are identical.

Does the resolution or dpi of the image make any difference?

Can you provide a sample of the type of images you're using that don't work?
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5605
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Re: Bugs with images in the internal RTF editor

Postby Wrangler » Mon Jun 01, 2015 10:21 am

I have always created rtf files from scratch in nb editor and never had the resizing problem. Could the problem be the editing of an rtf created in wordpad in the nb editor? Have you tried creating the rtf from scratch in nb editor?
Wrangler
--------------
"You never know about a woman. Whether she'll laugh, cry or go for a gun." - Louis L'Amour

Windows 7 Ultimate SP1 64bit
16GB Ram
Asus GTX 950 OC Strix
Software made with NeoBook
http://highdesertsoftware.com
User avatar
Wrangler
 
Posts: 1507
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA

Re: Bugs with images in the internal RTF editor

Postby Enigman » Mon Jun 01, 2015 10:24 am

Does the resolution or dpi of the image make any difference?

I don't mess with the dpi of images and it shouldn't make any difference unless NB is reading the dpi and acting differently based on the value. The images are all screen captures so the dpi should be 72 and I verified that they are 72 in an image editor.

Can you provide a sample of the type of images you're using that don't work?

I haven't found any images that do scale properly, so that would be ALL images I have. I can send some by PM if the PM will allow it.

Thanks.
Last edited by Enigman on Mon Jun 01, 2015 10:29 am, edited 1 time in total.
User avatar
Enigman
 
Posts: 314
Joined: Tue Apr 12, 2005 3:57 pm
Location: Foothill Ranch, CA

Re: Bugs with images in the internal RTF editor

Postby Enigman » Mon Jun 01, 2015 10:27 am

Wrangler wrote:I have always created rtf files from scratch in nb editor and never had the resizing problem. Could the problem be the editing of an rtf created in wordpad in the nb editor? Have you tried creating the rtf from scratch in nb editor?

I mentioned above that it doesn't matter. Starting from scratch in the NB editor it still scales to 92% or 75% for insert or paste respectively.
User avatar
Enigman
 
Posts: 314
Joined: Tue Apr 12, 2005 3:57 pm
Location: Foothill Ranch, CA

Re: Bugs with images in the internal RTF editor

Postby Enigman » Mon Jun 01, 2015 10:31 am

Can you provide a sample of the type of images you're using that don't work?

Okay, the PM editor doesn't allow attachments, so I'll send to the tech support e-mail.

LOL ... annnnnd that doesn't work since you have only a web form.

Where would you like me to send the images?

Thanks.
User avatar
Enigman
 
Posts: 314
Joined: Tue Apr 12, 2005 3:57 pm
Location: Foothill Ranch, CA

Re: Bugs with images in the internal RTF editor

Postby Neosoft Support » Tue Jun 02, 2015 10:52 am

You can send the files to: info<at>neosoftware.com
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5605
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Re: Bugs with images in the internal RTF editor

Postby Enigman » Tue Jun 02, 2015 11:08 am

Neosoft Support wrote:You can send the files to: info<at>neosoftware.com

Okay ... I have sent the files.
User avatar
Enigman
 
Posts: 314
Joined: Tue Apr 12, 2005 3:57 pm
Location: Foothill Ranch, CA

Re: Bugs with images in the internal RTF editor

Postby Neosoft Support » Wed Jun 03, 2015 10:50 am

Thank you for sending the sample image files. Using your files I was able to reproduce the problem. This bug has likely existed since the RTF editor was added to NeoBook several years ago. The problem appears to have something to do with how the RTF editor converts everything to twips. It's this conversion from pixels to twips and back that seems to be causing the scaling errors. Unfortunately, this feature is so ingrained into the RTF editor component that changing it would be a major undertaking. Given that this bug has gone unnoticed for a long time, and that the RTF format itself has many undesirable traits anyway, it doesn't make sense to spend days or weeks rewriting something that likely will be replaced entirely at some point in the future. Therefor, it would be preferable if we can find another solution for you. Here are a couple of options:

1. Convert your RTF files to HTML. Then use NeoBook's Web Browser component to display the HTML files in your pub. HTML is much more flexible than the aged RTF format. HTML offers more formatting options and supports more image formats. NeoBook's compiler will (in most cases) automatically include the HTML content inside your exe. Just be sure to use a literal path in the Web Browser object (no variables). And do NOT use spaces in your file names. I have sent you an example pub that demonstrates how this works.

2. Use the Editor's Toolbox plug-in to display your RTF files. Editor's Toolbox uses a much better RTF render than NeoBook's. I believe that
Editor's Toolbox's SetText action can load RTF code from a variable which might be useful. (Otherwise, you would need to leave your RTF files external to your compiled exe.)
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5605
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA


Return to General NeoBook Discussions

Who is online

Users browsing this forum: No registered users and 2 guests