Solved

resize image with send to mail recipient - blurry image

Posted on 2016-08-10
22
72 Views
Last Modified: 2016-09-27
Server 2012 R2 fully patched
XenDesktop 7.9
VMware 6
Outlook 2016

Above is our environment.  When I right click a single or multiple image(s) and select Send to Mail Recipient, I change the Picture size to small 800 x 600, it comes out blurry.  all selections for smaller, small, Medium and Large all come out blurry.  If I select Original size, it is fine.  I have an exact same setup at another client and the images come in clear when I resize the picture to small 800 x 600.

I have checked the win.ini file on both of these set ups and they are the same.  The mail recipient.MAPIMail in the SendTo folder is also the same on both servers.  I have been banging my head on this for a few days now.
0
Comment
Question by:accucom
  • 9
  • 7
  • 4
  • +1
22 Comments
 
LVL 38

Expert Comment

by:BillDL
ID: 41751846
Would it be possible to attach one of the original images and the same image after it has been resized?
0
 
LVL 42

Expert Comment

by:Davis McCarn
ID: 41751937
Ditto on what BillDL is asking for.  Having both would go a long way in helping us to understand and analyze your problem.
And watch out for the problem simply being a printing issue or a screen issue.
800X600 is OK for a 4"X3" print, at best and could look quite blurry on 2K monitor.
0
 

Author Comment

by:accucom
ID: 41752208
Attached is the original picture.  Clear as can be.  Also attached is the resized picture created by right clicking on the original image, selecting send to Mail recipient and changing to 800 x 600.  Did the same thing on a exact 2012 r2 server and the 800 x 600 is clear.  This server is replacing a 2008 r2 server which worked correctly.  Thanks for the help.
original.jpg
resized.jpg
0
 
LVL 51

Assisted Solution

by:Joe Winograd, EE MVE
Joe Winograd, EE MVE earned 200 total points (awarded by participants)
ID: 41752316
> 2012 r2 server and the 800 x 600 is clear

Please post that one, too. Here are properties of the two you posted, which explain why one is clear and the other is fuzzy:

properties
Regards, Joe
0
 

Author Comment

by:accucom
ID: 41752840
attached is the clear 800 x 600 image from an identical 2012 r2 server with xendesktop installed.
resized.jpg
0
 
LVL 51

Assisted Solution

by:Joe Winograd, EE MVE
Joe Winograd, EE MVE earned 200 total points (awarded by participants)
ID: 41752936
Here are the properties on that one:

properties resized clear
The key difference is that it is twice the file size of the fuzzy one. It is probably due to different JPEG compression on the two machines. I don't know where that is set in your environment, but look for a setting for JPG/JPEG compression — when you right-click to select the 800x600 size maybe there's a compression setting that is different in the two environments (remember, JPEG is lossy compression, and the setting can make a huge difference in quality). There may be some other reason for the clear one being twice the file size of the fuzzy one, but I can't think of anything else, as all the normal properties that could make a difference (resolution, size/pixels, color depth, etc.) are the same (and I looked at other properties with five other image viewers besides IrfanView). Regards, Joe
0
 
LVL 38

Accepted Solution

by:
BillDL earned 300 total points (awarded by participants)
ID: 41754571
I ran both of the resized images through JPEGsnoop (http://www.impulseadventure.com/photo/jpeg-snoop.html) and the most significant difference is the compression ratio:

Poor quality fuzzy resized image:
Compression Ratio: 30.89:1
Bits per pixel: 0.78:1

Better quality resized image:
Compression Ratio: 15.26:1
Bits per pixel: 1.57:1

For some reason the windows modules used to resize images for emailing on one computer is compressing the image twice as much as the same process on the other.

Whether this is a setting in the registry, or perhaps a different DLL version used by the process is something I don't know and cannot ascertain because I do not have access to Server 2012.  In previous versions of Windows the Send To > Mail Recipient process traditionally called sendmail.dll which actually contains the resize dialog.  It was the same DLL that also allowed you to Send To > Desktop (create shortcut).  This may well have changed with later Windows versions.

If you have a lot of time on your hands you might be able to ascertain what DLLs are called by the process and compare versions using Dependency Walker (http://www.dependencywalker.com).  Server 2012 may already have its own built-in "depends.exe" command.  It came with some Support Tools for previous Windows versions.

Again, if you have time on your hands, you might be able to capture what registry values are accessed when you run the process, and thereby check to see whether there are any compression-related settings in any of the accessed registry values.  You could do this using a utility like process Monitor or Process Explorer:
https://technet.microsoft.com/en-gb/sysinternals/bb795533.aspx

This type of diagnostics is laborious work.

It could simply be that a Windows Update has messed with the files that perform this process on one computer but not the other.
2
 
LVL 51

Expert Comment

by:Joe Winograd, EE MVE
ID: 41754888
> the most significant difference is the compression ratio

Hi Bill,
Thank you for confirming my suspicion that the JPEG compression is different on the two machines. That JPEGsnoop is an awesome tool! I was not aware of it, but it is now in my imaging bag-of-tricks, and a donation to the author is on the way. Really appreciate the heads-up on it! Regards, Joe
1
 

Author Comment

by:accucom
ID: 41759506
thanks for all the help.  I ended up rebuilding the a new server with the same configuration.  I installed software one at a time and tested the sendto feature and so far so good.  They only thing I have not installed are the 140 fonts that are needed for certain users.  I think it may just been a corrupt dll file some how but will not research anymore since I have spent way too much time on this.

Thanks again for all the assistance.
0
 
LVL 51

Expert Comment

by:Joe Winograd, EE MVE
ID: 41759554
You're welcome. Happy to help. And thanks to you for the update. Regards, Joe
0
 
LVL 42

Expert Comment

by:Davis McCarn
ID: 41778371
Unfortunately; a wipe and reload is not a fix so delete, please!
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
LVL 51

Expert Comment

by:Joe Winograd, EE MVE
ID: 41778425
I disagree with the suggestion to delete. There are some good comments in this thread that an EE member would be well-advised to consider when having a similar problem. In other words, a thread like this should be found in the PAQ when a member searches for such a problem.

I recommend that BillDL's excellent post with a link to the JPEGsnoop tool be the Accepted Solution:
https:#a41754571

I recommend that my post (just prior to Bill's) with the comment that JPEG compression is probably the issue be an Assisted Solution:
#a41752936

As a general comment, I believe we should always think beyond the specific question at hand to a broader audience where other members may have the same, or a similar, problem. When the thread has ideas that will help future situations (such as JPEGsnoop in this case), I think we should not delete the question, even if the specific solution in this one particular instance was something different (such as rebuilding the server in this case).

Just one person's opinion. Regards, Joe
0
 
LVL 51

Expert Comment

by:Joe Winograd, EE MVE
ID: 41804460
Good comments that will help other members who have the same, or a similar, problem.
0
 
LVL 38

Expert Comment

by:BillDL
ID: 41804559
Thank you Joe
0
 
LVL 51

Expert Comment

by:Joe Winograd, EE MVE
ID: 41804791
You're welcome, Bill — well-deserved!
0
 

Author Comment

by:accucom
ID: 41816530
Ok, thanks for all the help with the issue so far.  Apparently, the rebuild of server fixed the blurry image issue with Send To Mail Recipient but still having a big issue when resizing to the smaller, small or medium size from Send To Mail Recipient.  This has go to be a windows issue as I just built the same XenDesktop 7.9 on a server 2012 r2 running on vCenter with the same Guest parameters and the Send To Mail Recipient works perfectly.  I have attached the original file and also the resized image at small 800 x 600.  I have also attached the resized ph
MH-SQ-251B_Soul-Be-Still-1.jpg
resized-bad.jpg
0
 

Author Comment

by:accucom
ID: 41816540
attached is the same original file that was resized on the another 2012r2 server with XD.  Also, both running on esxi 5.5.
Good-Resized.jpg
0
 
LVL 51

Expert Comment

by:Joe Winograd, EE MVE
ID: 41816548
The original image is 2,467,124 bytes. The "good" resized image is 61,983 bytes; the "bad" is 57,931. In other words, they're both highly compressed, and not a big difference between them. The fantastic tool that Bill introduced us to (JPEGsnoop) says that the compression ratio on the "good" is 17.22:1, while on the "bad" it is 18.61:1 — again, not a big difference between them. In fact, looking at the "good" and "bad" side-by-side, I don't see a difference in the "blurriness", although there's certainly a big difference in the shades of green:

good bad side-by-side
Regards, Joe
0
 

Author Comment

by:accucom
ID: 41816677
thanks Joe.  The blurriness issue was resolved by rebuilding the server from scratch.  Now the issue is resizing and the color after resizing.  Whats crazy is it looks great if you select large or original size, but selecting medium, small or smaller causes the lighter green to show.  It appears it may just affect green and yellow.  My client uses photoshop but insist on being able to right click several images and sent to mail recipient in order to resize as it saves many steps and time.
0
 
LVL 51

Expert Comment

by:Joe Winograd, EE MVE
ID: 41816860
Sorry...misunderstood your comment. So now the issue is color, not blurriness.

> Whats crazy is it looks great if you select large or original size, but selecting medium, small or smaller causes the lighter green to show.

I guess that's because whatever resizing tool it uses is changing the color channels on medium/small/smaller but not on large. I just ran the original through IrfanView and used its feature that allows you to specify the resulting size. I set it at 60KB and it came out to 61,117 bytes and looks fine:

IV-60kb
JPEGsnoop says the compression ratio is 20.80:1. It is not blurry and it is the right color green. I really don't know what to say. Regards, Joe
0
 

Author Comment

by:accucom
ID: 41817137
Thanks Joe,

I am at a loss also.  There isnt much information on the send to feature in windows.  I thought it may be the sendmail.dll in system32.  I compared the registry key with the working 2012 server and all settings are the same.
0
 
LVL 38

Expert Comment

by:BillDL
ID: 41817752
I am really puzzled by this issue also.

sendmail.dll is certainly the DLL that is called for the Right-Click > Send To > "Desktop (create shortcut)" and "Mail Recipient" options on any Windows system that I have used, however Server 2012 is not one of those.  I cannot imagine that there should be any significant difference in this respect though.

As to the question of what program actually does the resizing, I'm afraid that I do not know whether sendmail.dll does the processing internally or passes it out to another DLL or EXE.

I DO NOT think that the shared Graphics Filters will have any relationship to this.  Microsoft applications like MS Office (and possibly also Windows applications like MS Paint) use shared graphics filters, and from what I can see they are used to import and unencode and also to export and re-encode to different image formats such as would be done when using the "Save As" option and changing the file type.  An example is:
C:\Program Files\Common Files\Microsoft Shared\GRPHFLT\JPEGIM32.FLT
This is the "JPEG Import/Export Graphic Filter" from the 32-bit XP computer I am currently using, so any comparable filters on recent versions of Windows may be in different locations.  There are filters for GIF and PNG in that same folder.

My gut feeling is that these are not used for the resize process that is causing issues on your system as I believe they are installed by (or updated from Windows default by) Microsoft Office, but I suppose it might be worth comparing the versions on the system that resizes with good results and the one that messes up the images.

The most puzzling thing about the two images is that there is so little difference between the file sizes, the compression ratios, and the bits per pixel values, and it is therefore surprising that there should be such a noticeable difference with the colours.  In my experience, downsizing JPG images has never noticeably altered the shades of colour.  Sometimes they lose sharpness, but I have never experienced such a radical colour change.

Increasing JPEG compression will change the image incrementally until too much noticeably degrades it, but normally the colours are not affected as much as the actual quality of the image.  There is always going to be a change in the luminance between the darkest and lightest pixels, and various other changes, but the difference between your two systems is radical.  It is almost as though a JPG with a rich colour range has been re-encoded as a GIF which supports a more limited range of colours, but that is not the case here.   In fact, the "bad" image that is a lighter shade of green contains 68,540 unique colours, and the one with the darker shade of green contains 65,133 unique colours.  The "Bad" image has a wider colour range than the "Good" one !!

Adjusting the "Gamma" values of an image will change the number of unique colours used.  The gamma of an image is a measure of its contrast and brightness.  The gamma curve has three components: red, green, and blue and is represented by a curve.  Where an image has a colour "cast" (eg. yellow due to halogen lighting), gamma adjustments are used to correct this.  By increasing the green, the "good" image can be made to match the "bad" one's green hue without touching the red and blue, and by decreasing only the green the "bad" image can be made to match the hues of the "good" image.  In each case the number of unique colours is either increased or decreased by approximately the same difference as you currently have between your good and bad images.

Whatever function is doing the resizing and resaving is, in my opinion, messing with the gamma and is adding a green colour cast.  I would be curious to see whether a predominantly red image would become a lighter shade of red, and if a predominantly blue image would become a lighter shade of blue by similar degrees as the green one has been affected, or if this is restricted to green only.  I am not saying that I can pin-point the problem or fix it, I am just curious.
1

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

We are happy to announce a brand new addition to our line of acclaimed email signature management products – CodeTwo Email Signatures for Office 365.
A procedure for exporting installed hotfix details of remote computers using powershell
In this Micro Tutorial viewers will learn how to use Boot Corrector from Paragon Rescue Kit Free to identify and fix the boot problems of Windows 7/8/2012R2 etc. As an example is used Windows 2012R2 which lost its active partition flag (often happen…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now